Kernel: proxmox-kernel-6.5.11-7-pve-signed
zfs 2.2 (ZFS: Loaded module v2.2.0-pve4, pve-manager/8.1.3)
Enabling trim, "autotrim=yes" on zfs pools, causes vdev_autotrim kernel threads to go into "D" state causing artificial high machine load. May also cause other unforseen consequences.
Confirmed on multiple machines with multiple different configurations including hardware, md and zfs raids, both in raidz and mirror configurations.
Kernels affected for sure: 6.5.11-6-pve and 6.5.11-7-pve
zfs 2.2 (ZFS: Loaded module v2.2.0-pve4, pve-manager/8.1.3)
Enabling trim, "autotrim=yes" on zfs pools, causes vdev_autotrim kernel threads to go into "D" state causing artificial high machine load. May also cause other unforseen consequences.
Confirmed on multiple machines with multiple different configurations including hardware, md and zfs raids, both in raidz and mirror configurations.
Kernels affected for sure: 6.5.11-6-pve and 6.5.11-7-pve
[900927.659938] INFO: task vdev_autotrim:7851 blocked for more than 241 seconds.
[900927.660540] Tainted: P S O 6.5.11-6-pve #1
[900927.661230] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[900927.661854] task:vdev_autotrim state:D stack:0 pid:7851 ppid:2 flags:0x00004000
[900927.662496] Call Trace:
[900927.663141] <TASK>
[900927.663770] __schedule+0x3fd/0x1450
[900927.664379] ? __wake_up_common_lock+0x8b/0xd0
[900927.664984] schedule+0x63/0x110
[900927.665566] cv_wait_common+0x109/0x140 [spl]
[900927.666190] ? __pfx_autoremove_wake_function+0x10/0x10
[900927.666776] __cv_wait+0x15/0x30 [spl]
[900927.667422] vdev_autotrim_thread+0x797/0x9a0 [zfs]
[900927.668777] ? __pfx_vdev_autotrim_thread+0x10/0x10 [zfs]
[900927.670120] ? __pfx_thread_generic_wrapper+0x10/0x10 [spl]
[900927.670746] thread_generic_wrapper+0x5c/0x70 [spl]
[900927.671418] kthread+0xef/0x120
[900927.672030] ? __pfx_kthread+0x10/0x10
[900927.672723] ret_from_fork+0x44/0x70
[900927.673319] ? __pfx_kthread+0x10/0x10
[900927.673909] ret_from_fork_asm+0x1b/0x30
[900927.674488] </TASK>