summaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-12-10 12:00:00 -0800
committerBrian Behlendorf <[email protected]>2010-12-14 10:06:44 -0800
commit5b63b3eb6f42f3d9f6a19b22c3f10f72927eeacc (patch)
treee748e57cc0c2b97a728daec9fb703fcc3c197760 /include/sys
parent8d4e8140ef67fa9c8fa0b1d0f5b1d5d36c747969 (diff)
Use cv_timedwait_interruptible in arc
The issue is that cv_timedwait() sleeps uninterruptibly to block signals and avoid waking up early. Under Linux this counts against the load average keeping it artificially high. This change allows the arc to sleep interruptibly which mean it may be woken up early due to a signal. Normally this means some extra care must be taken to handle a potential signal. But for the arcs usage of cv_timedwait() there is no harm in waking up before the timeout expires so no extra handling is required.
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/zfs_context.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
index c44990351..44e3dd1d3 100644
--- a/include/sys/zfs_context.h
+++ b/include/sys/zfs_context.h
@@ -310,6 +310,7 @@ extern void cv_wait(kcondvar_t *cv, kmutex_t *mp);
extern clock_t cv_timedwait(kcondvar_t *cv, kmutex_t *mp, clock_t abstime);
extern void cv_signal(kcondvar_t *cv);
extern void cv_broadcast(kcondvar_t *cv);
+#define cv_timedwait_interruptible(cv, mp, at) cv_timedwait(cv, mp, at);
/*
* kstat creation, installation and deletion