zfs/module/spl
Ned Bass 184c687387 Emulate illumos interface cv_timedwait_hires()
Needed for Illumos #3582. This interface is supposed to support
a variable-resolution timeout with nanosecond granularity.  This
implementation rounds up to microsecond resolution, as nanosecond-
precision timing is rarely needed for real-world performance
tuning and may incur unnecessary busy-waiting.  usleep_range() is
used if available, otherwise udelay() or msleep() are used
depending on the length of the delay interval.

Add flags from sys/callo.h as these are used to control the behavior of
cv_timedwait_hires().  Specifically,

CALLOUT_FLAG_ABSOLUTE
    Normally, the expiration passed to the timeout API functions is
    an expiration interval. If this flag is specified, then it is
    interpreted as the expiration time itself.

CALLOUT_FLAG_ROUNDUP
    Roundup the expiration time to the next resolution boundary. If this
    flag is not specified, the expiration time is rounded down.

References:
    https://www.illumos.org/issues/3582
    illumos/illumos-gate@0689f76

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #304
2013-11-04 09:49:24 -08:00
..
Makefile.in Add script for builtin module building. 2012-07-26 15:13:09 -07:00
spl-atomic.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-condvar.c Emulate illumos interface cv_timedwait_hires() 2013-11-04 09:49:24 -08:00
spl-cred.c Linux 3.8 compat: Use kuid_t/kgid_t when required 2013-08-09 10:09:29 -07:00
spl-debug.c Linux 3.11 compat: Replace num_physpages with totalram_pages 2013-08-08 09:14:29 -07:00
spl-err.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-generic.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-kmem.c Consistently use local_irq_disable/local_irq_enable 2013-10-09 14:00:56 -07:00
spl-kobj.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-kstat.c 3537 add kstat_waitq_enter and friends 2013-10-25 13:41:52 -07:00
spl-mutex.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-proc.c PaX/GrSecurity Linux 3.8.y compat: Use __no_const on struct ctl_table 2013-08-08 09:51:34 -07:00
spl-rwlock.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-taskq.c Fix taskq_wait_id() 2013-05-03 14:32:29 -07:00
spl-thread.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-time.c Replace current_kernel_time() with getnstimeofday() 2013-10-09 13:28:30 -07:00
spl-tsd.c Linux 3.9 compat: Switch to hlist_for_each{,_rcu} 2013-03-14 10:43:34 -07:00
spl-vnode.c Linux 3.8 compat: Use kuid_t/kgid_t when required 2013-08-09 10:09:29 -07:00
spl-xdr.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-zlib.c Refresh links to web site 2013-03-04 19:09:34 -08:00