diff options
author | Kevin Jin <[email protected]> | 2024-01-17 12:03:58 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2024-01-18 11:33:29 -0800 |
commit | 07cf973fe9e4b99b9c0a89038301fc9ad26f7e95 (patch) | |
tree | bbdd2f79c11b56926775208973e2ed4976bca9e3 /module/zfs | |
parent | 2ecc2dfe42707d8569e30f3b6a4526a0a825d479 (diff) |
Autotrim High Load Average Fix
Switch from cv_wait() to cv_wait_idle() in vdev_autotrim_wait_kick(),
which should mitigate the high load average while waiting.
Reviewed-by: Brian Atkinson <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: jxdking <[email protected]>
Closes #15781
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/vdev_trim.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/vdev_trim.c b/module/zfs/vdev_trim.c index 03e17db02..d96b75e5e 100644 --- a/module/zfs/vdev_trim.c +++ b/module/zfs/vdev_trim.c @@ -194,7 +194,8 @@ vdev_autotrim_wait_kick(vdev_t *vd, int num_of_kick) for (int i = 0; i < num_of_kick; i++) { if (vd->vdev_autotrim_exit_wanted) break; - cv_wait(&vd->vdev_autotrim_kick_cv, &vd->vdev_autotrim_lock); + cv_wait_idle(&vd->vdev_autotrim_kick_cv, + &vd->vdev_autotrim_lock); } boolean_t exit_wanted = vd->vdev_autotrim_exit_wanted; mutex_exit(&vd->vdev_autotrim_lock); |