lkml.org 
[lkml]   [2008]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Active waiting with yield()
    > If I have a race condition that gets triggered just for one user in the 
    > world when repeatedly loading & unloading a driver for an hour, and I use
    > yield() to solve it, what's wrong with it? A wait queue increases cache
    > footprint for every user. (even if I use preallocated hashed wait queue,
    > it still eats a cacheline to access it and find out that it's empty)

    Reread what I wrote.

    You don't need to use a hashed queue, you don't need to even reference
    the queue in the normal case. You cost is one variable, which you can
    probably sensibly locate, and a predicted jump.

    For that you get proper sleeping behaviour, CPU used by other tasks or
    guests and you don't hang on hard real time tasks.


    \
     
     \ /
      Last update: 2008-11-14 22:23    [W:2.325 / U:0.564 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site