On Sun, Dec 01, 2002 at 11:17:18PM -0500, Steve Freeland wrote:
>       I don't know how much this would benefit other platforms --
> I tried on an OpenBSD machine (some sort of i386, don't have details
> about the hardware) and the minimum overhead is about the same (20 ms) for
> both calls.  I've attached the program I used to test this in case anyone
> wants to try it out on their systems (I'd be especially curious to see
> what the results are for people which some sort of low-latency kernel.)

Attached are the results for a 1.2GHz Athlon Tbird running Linux 
2.4.19-ck14 (http://members.optusnet.com.au/ckolivas/kernel/).  This 
particular kernel includes patches 001, 002, 003, and 004 and has kernel 
preemption enabled.
Testing _select_sleep (x 1000), delay 3
Total time: 3199.437000 ms; unit time: 3.199437 ms; estimated overhead: 0.199437 ms

Testing _usleep_sleep (x 1000), delay 3
Total time: 4031.939000 ms; unit time: 4.031939 ms; estimated overhead: 1.031939 ms

Testing _nanosleep_sleep (x 1000), delay 3
Total time: 4041.959000 ms; unit time: 4.041959 ms; estimated overhead: 1.041959 ms

Testing _select_sleep (x 1000), delay 8
Total time: 8276.960000 ms; unit time: 8.276960 ms; estimated overhead: 0.276960 ms

Testing _usleep_sleep (x 1000), delay 8
Total time: 9238.953000 ms; unit time: 9.238953 ms; estimated overhead: 1.238953 ms

Testing _nanosleep_sleep (x 1000), delay 8
Total time: 9016.961000 ms; unit time: 9.016961 ms; estimated overhead: 1.016961 ms

Testing _select_sleep (x 1000), delay 13
Total time: 13060.955000 ms; unit time: 13.060955 ms; estimated overhead: 0.060955 ms

Testing _usleep_sleep (x 1000), delay 13
Total time: 14000.955000 ms; unit time: 14.000955 ms; estimated overhead: 1.000955 ms

Testing _nanosleep_sleep (x 1000), delay 13
Total time: 14001.957000 ms; unit time: 14.001957 ms; estimated overhead: 1.001957 ms

Testing _select_sleep (x 1000), delay 18
Total time: 18000.959000 ms; unit time: 18.000959 ms; estimated overhead: 0.000959 ms

Testing _usleep_sleep (x 1000), delay 18
Total time: 18999.954000 ms; unit time: 18.999954 ms; estimated overhead: 0.999954 ms

Testing _nanosleep_sleep (x 1000), delay 18
Total time: 18999.957000 ms; unit time: 18.999957 ms; estimated overhead: 0.999957 ms

Testing _select_sleep (x 1000), delay 23
Total time: 23002.957000 ms; unit time: 23.002957 ms; estimated overhead: 0.002957 ms

Testing _usleep_sleep (x 1000), delay 23
Total time: 24000.954000 ms; unit time: 24.000954 ms; estimated overhead: 1.000954 ms

Testing _nanosleep_sleep (x 1000), delay 23
Total time: 23999.961000 ms; unit time: 23.999961 ms; estimated overhead: 0.999961 ms

Testing _select_sleep (x 1000), delay 28
Total time: 28001.033000 ms; unit time: 28.001033 ms; estimated overhead: 0.001033 ms

Testing _usleep_sleep (x 1000), delay 28
Total time: 29020.878000 ms; unit time: 29.020878 ms; estimated overhead: 1.020878 ms

Testing _nanosleep_sleep (x 1000), delay 28
Total time: 29010.958000 ms; unit time: 29.010958 ms; estimated overhead: 1.010958 ms

Reply via email to