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 <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: DHE <[email protected]>
Closes openzfs#9091
  • Loading branch information
DeHackEd authored and allanjude committed Aug 12, 2019
1 parent 65b055d commit 01a77b9
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 @@ -691,8 +691,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 01a77b9

Please sign in to comment.