From: Chunwei Chen Date: Wed, 11 May 2016 23:55:48 +0000 (-0700) Subject: Use cv_timedwait_sig_hires in arc_reclaim_thread X-Git-Tag: zfs-0.7.0-rc1~159 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9bb2b682785d48b4bcdaca9d382fc87bbf6e2fb;p=zfs Use cv_timedwait_sig_hires in arc_reclaim_thread The was originally using interruptible cv_timedwait_sig, but was changed to uninterruptible cv_timedwait_hires in ae6d0c6. Use _sig_hires instead to allow interruptible sleep. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #4633 Closes #4634 --- diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index 693035ee2..6ba580339 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -365,6 +365,8 @@ extern void cv_broadcast(kcondvar_t *cv); #define cv_timedwait_sig(cv, mp, at) cv_timedwait(cv, mp, at) #define cv_wait_sig(cv, mp) cv_wait(cv, mp) #define cv_wait_io(cv, mp) cv_wait(cv, mp) +#define cv_timedwait_sig_hires(cv, mp, t, r, f) \ + cv_timedwait_hires(cv, mp, t, r, f) /* * Thread-specific data diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 89d11ef42..716ba5c2d 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -3506,7 +3506,7 @@ arc_reclaim_thread(void) * even if we aren't being signalled) */ CALLB_CPR_SAFE_BEGIN(&cpr); - (void) cv_timedwait_hires(&arc_reclaim_thread_cv, + (void) cv_timedwait_sig_hires(&arc_reclaim_thread_cv, &arc_reclaim_lock, SEC2NSEC(1), MSEC2NSEC(1), 0); CALLB_CPR_SAFE_END(&cpr, &arc_reclaim_lock); }