lkml.org 
[lkml]   [2008]   [Nov]   [17]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 17 Nov 2008 12:39:10 -0500 (EST)
FromMikulas Patocka <>
SubjectRe: Active waiting with yield()
On Sat, 15 Nov 2008, Peter Zijlstra wrote:

> On Fri, 2008-11-14 at 16:41 -0500, Mikulas Patocka wrote:
> 
> > So, use msleep(1) instead of yield() ?
> 
> wait_event() of course!

Why? Why developes don't like active waiting when terminating a driver?
Is there any real workload when 1ms delay on driver unload would be 
problematic? Or don't they like it because of coding style?

L1 cache miss --- 10ns --- on every request, when using wait queues
msleep latency --- 1ms --- on driver termination, when using msleep
--- so if the driver processes more than 100000 requests between reboots, 
wait queues actually slow things down.
Mikulas


\
 
 \ /
  Last update: 2008-11-17 18:43    [from the cache]
©2003-2008