lkml.org 
[lkml]   [1999]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Overscheduling DOES happen with high web server load.
       From: alan@lxorguk.ukuu.org.uk (Alan Cox)
    Date: Fri, 7 May 1999 01:26:34 +0100 (BST)

    Linus theory btw doesnt work either.

    I think they do, and it's an issue of miscommunication :-)

    [ Linus, please correct me if I'm wrong below, this is about the
    wake-one scheme you described to us earlier today. ]

    > [ for everyone else's benefit Linus's suggestion is for the task to
    > indicate, when placing himself on the run queue, that he is
    > "wake one" capable, then the wake up routines stop doing work
    > when they hit the first task which is marked this way and is not
    > running already ]

    Unfortunately you also need to consider a common case where another task
    POSIXly requires waking. The classic is select(). Such tasks should always
    be woken.

    I think Linus meant another thing, and I worded it incorrectly above, sorry.

    I believe he intended that the wakeup scheme be:

    1) Wakes up everyone not marked as "wake one" capable, this deals with
    the select issue and is the crux behind why he suggests this scheme.

    2) Amongst (only) the "wake one" capable tasks, the first one which is
    not already running is woken, and then no further "wake one" capable
    tasks are poked.

    And furthermore, only in specific places like accept() do you indicate
    the "wake one" capability when adding yourself to the wait queue. And
    in such places you make damn sure that you "eat" the event or do
    another wakeup if you cannot for some reason (failed allocation of
    some structure, etc.)

    This means you do not indicate "wake one" capability for the listen
    socket polling case, for example.

    Linus, did I get it right? :-)

    Later,
    David S. Miller
    davem@redhat.com

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

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