How does this affect the rest of the performance of the machine, are there any downsides?
-----Original Message-----
From: Jim Hazen [mailto:[EMAIL PROTECTED]]
Sent: February 18, 2002 8:46 PM
To: Blackdown
Subject: Re: Why do threads take so long to wake up underlinux

Ok, I've rebuild the a kernel with HZ 1000 (and bumped CLOCKS_PER_SEC to 1000 too).

The output is now closer to what one would expect.  Also if you always sleep for 10ms, you get a total time of 10 ms for nearly every run (some runs were 11-13ms, but most ~27 were 10).

Hope this helps.  I'm sure glad to know this little trick. 

total time = 0 for sleep(0)
total time = 1 for sleep(1)
total time = 3 for sleep(2)
total time = 4 for sleep(3)
total time = 5 for sleep(4)
total time = 6 for sleep(5)
total time = 6 for sleep(6)
total time = 8 for sleep(7)
total time = 9 for sleep(8)
total time = 10 for sleep(9)
total time = 11 for sleep(10)
total time = 12 for sleep(11)
total time = 13 for sleep(12)
total time = 14 for sleep(13)
total time = 14 for sleep(14)
total time = 15 for sleep(15)
total time = 16 for sleep(16)
total time = 18 for sleep(17)
total time = 19 for sleep(18)
total time = 20 for sleep(19)
total time = 21 for sleep(20)
total time = 22 for sleep(21)
total time = 23 for sleep(22)
total time = 24 for sleep(23)
total time = 25 for sleep(24)
total time = 25 for sleep(25)
total time = 27 for sleep(26)
total time = 28 for sleep(27)
total time = 29 for sleep(28)
total time = 30 for sleep(29)

Reply via email to