The suspension time may be longer than requested because the argument value is rounded up to an integer multiple of the sleep resolution or because of the scheduling of other activity by the system. But, except for the case of being interrupted by a signal, the suspension time will not be less than the time specified by rqtp, as measured by the system clock, CLOCK_REALTIME.
How are you achieving an average of 0.5 ms? I'm guessing that you have set hires_tick=1 in /etc/system (which changes the clock interrupt from 10ms to 1ms), and that you are requesting something less than 1ms.
For something less than the clock resolution, check out CLOCK_HIGHRES in timer_create(3RT). This uses a CPU cyclic timer instead of the clock interrupt. The exact resolution you are able to achieve will depend on your hardware and the way you choose to implement the sigevent handler (i.e. there will be a point beyond which the implementation overhead will be the limiting factor).
Hope this helps, Phil Ben Steven wrote:
Is there any _supported_ way to sleep shorter than 0.5 ms on average? Using lock-free data structures implies waiting -> the current "nanosleep" functionality does not satisfy our needs because it's increasing the latency :(. BenThis message posted from opensolaris.org_______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org