mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
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 <batkinson@lanl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: jxdking <lostking2008@hotmail.com> Closes #15781
This commit is contained in:
parent
f45dd90f34
commit
1494e8fbaa
@ -196,7 +196,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);
|
||||
|
Loading…
Reference in New Issue
Block a user