Re: schedule() "spaghetti" in 2.3.2 ..

Andi Kleen (ak@muc.de)
Wed, 26 May 1999 17:28:56 +0200


In muc.lists.linux-kernel, you wrote:
>
>On Mon, 24 May 1999, Matti Aarnio wrote:
>
>> Same engineers also developed a new constant time scheduler which
>> they intent to submit to 2.3. (The change is "too large" for it to
>> be accepted into 2.2.)
>>
>> With "Wake One" and the scheduler changes, Iprobe does show that the
>> time spent in small number of scheduler addresses does down dramatically.
>> (From 30% to 0.1% of realtime, or some such...)
>
>wake-one alone solves the problem, doesnt it? And we have wake-one in
>2.3.3. I'm curious how that patch looks like nevertheless. (i'm just
>rather convinced that it cannot be done constant-time without giving up
>crucial scheduling features, but i'd be happy to be proved otherwise.
>There _are_ ways to make it constant, it just sacrifices things like
>proper SMP scheduling.)

It doesn't completely. The current wake-one only works if the process
blocks in accept, which means only a single listen socket, which means only
a single virtual web server. Fortunately most web benchmarks only test that ;)

For the processes not lucky enough to only require a single
socket/file/whatever there is currently no way to get wake-one semantics
over poll/select. All processes polling have to be woken up, although only
one will finally accept.

wake-one for poll per default would break too many programs, but perhaps
it can be done with a file flag (like O_NONBLOCK - O_WAKEONE). What do you
think?

-Andi

-
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/