Don't wakeup unnecessarily in 'zpool events -f'

ZED can prevent CPU's from properly sleeping.

Rather than periodically waking up in the zevents code, just go to sleep and wait for a wakeup.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: DHE <git@dehacked.net>
Closes #9091
This commit is contained in:
DeHackEd 2019-08-05 14:35:47 -04:00 committed by Tony Hutter
parent 66398a4da3
commit 376ca4649b

View File

@ -683,8 +683,7 @@ zfs_zevent_wait(zfs_zevent_t *ze)
break; break;
} }
error = cv_timedwait_sig(&zevent_cv, &zevent_lock, error = cv_wait_sig(&zevent_cv, &zevent_lock);
ddi_get_lbolt() + MSEC_TO_TICK(10));
if (signal_pending(current)) { if (signal_pending(current)) {
error = SET_ERROR(EINTR); error = SET_ERROR(EINTR);
break; break;