Re: Linux 2.4.17-pre5

From: Davide Libenzi (
Date: Sat Dec 08 2001 - 21:35:28 EST

On Sun, 9 Dec 2001, Rusty Russell wrote:

> With HMT/hyperthread:
> Fifth process scheduled on 4 (shared with 0).
> When processes on 1, 2, or 3 schedule(), that processor sits
> idle, while processor 0/4 is doing double work (ie. only 2 in
> 5 chance that the right process will schedule() first).
> Finally, 0 or 4 will schedule() then wakeup, and be pulled
> onto another CPU (unless they are all busy again).

It's not easy to get this right anyway.
Using the scheduler i'm working on and setting a trigger load level of 2,
as soon as the idle is scheduled it'll go to grab the task waiting on the
other cpu and it'll make it running.
But this is not always right and, more difficult, it's very problematic to
understand when it's right and when it's not to behave in that way.
Think about a task that has built its own cache image on that cpu and that
it's veru likely that it's going to be woken up very soon.
By picking up another task you're going to trash its cache image.
What i'm thinking is to have the idle, instead of permanently halt()ed
waiting for an IPI, to be woken up at each timer tick to check the overall
balancing status.
Each time an unbalancing is discovered a counter ( on the idle cpu ) is
increased and, when this counter will become above a certain value, the
move is actually performed.
In this way we'll have a value that will make the scheduler to bahave
differently depending on its settings.

- Davide

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

This archive was generated by hypermail 2b29 : Sat Dec 15 2001 - 21:00:14 EST