]> git.proxmox.com Git - mirror_spl.git/commit - config/spl-build.m4
Emulate illumos interface cv_timedwait_hires()
authorNed Bass <bass6@llnl.gov>
Fri, 1 Nov 2013 20:37:58 +0000 (13:37 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 4 Nov 2013 17:49:24 +0000 (09:49 -0800)
commit184c6873874c350bfb0b74f9e08ec8d89750d603
tree504643ad1332fce93a920b7e6bbb1b30cd216dbd
parent0f4b9a58063d95b4da26c64dab4054d6272e0973
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
config/spl-build.m4
include/linux/Makefile.am
include/linux/delay_compat.h [new file with mode: 0644]
include/sys/Makefile.am
include/sys/callo.h [new file with mode: 0644]
include/sys/condvar.h
include/sys/time.h
module/spl/spl-condvar.c