27 May
2009
27 May
'09
6 a.m.
On Tue, May 26, 2009 at 9:48 PM, Grant Likely grant.likely@secretlab.ca wrote:
First, udelay just burns time, and if the delay is too large, then the it is wasting time that could be used for something else. That being said, it needs to be balanced with the context switch overhead. If the udelay() is less than double the context switch time, then the overhead is greater than the time spent spinning.
BTW, lmbench lat_ctx test case tells me that context switch latency is measured somewhere around 30 to 60 us for user space processes sleeping on a file descriptor. That will be lower for kernel threads since there is no syscall overhead to account for.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.