[lkml]   [2002]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Problems with wait queues

    On Wed, Jun 26, 2002 at 10:17:45AM -0400, Richard B. Johnson wrote:
    > I am sure that you can have things look correct as well as run
    > properly. However, you didn't show us the code.

    It's quite large, and I didn't think I was "syntactically" wrong. But
    the code is available, if somebody wants to have a look.

    > You need to do something like:
    > interruptible_sleep_on(&semaphore);
    > while your wake-up occurs with:
    > wake_up_interruptible(&semaphore);

    That's what I do, although I use the wait_event_interruptible macro
    instead of interruptible_sleep_on.

    > Both ways (and others) will look fine with `top` and will sleep
    > properly.

    If we're talking about %CPU times, right. If we're talking loadavg,
    no. As I said in my previous message, I think it's because my
    wake_up_interruptible() is *always* triggered during the timer
    interrupt, just before the scheduler runs (new data is available every

    I'm not sure, but I think that the loadavg is computed at the
    beginning of each scheduler run, thus, my task always looks "running"
    at this time, even though it just runs for a few microseconds each

    Nicolas Bougues

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:27    [W:0.030 / U:27.248 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site