Skip to content

Commit

Permalink
Don't wakeup unnecessarily in 'zpool events -f'
Browse files Browse the repository at this point in the history
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 openzfs#9091
  • Loading branch information
DeHackEd authored and tonyhutter committed Dec 27, 2019
1 parent 2881be3 commit 9eaec88
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions module/zfs/fm.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,7 @@ zfs_zevent_wait(zfs_zevent_t *ze)
break;
}

error = cv_timedwait_sig(&zevent_cv, &zevent_lock,
ddi_get_lbolt() + MSEC_TO_TICK(10));
error = cv_wait_sig(&zevent_cv, &zevent_lock);
if (signal_pending(current)) {
error = SET_ERROR(EINTR);
break;
Expand Down

0 comments on commit 9eaec88

Please sign in to comment.