Re: [patch] CFS scheduler, -v12

Peter Williams
2007-05-17T23:45:23Z

Ingo Molnar wrote:
> * Peter Williams <pwil3058@bigpond.net.au> wrote:
>
>> Load balancing appears to be badly broken in this version. When I
>> started 4 hard spinners on my 2 CPU machine one ended up on one CPU
>> and the other 3 on the other CPU and they stayed there.
>
> could you try to debug this a bit more?

I've now done this test on a number of kernels: 2.6.21 and 2.6.22-rc1
with and without CFS; and the problem is always present. It's not
"nice" related as the all four tasks are run at nice == 0.

It's possible that this problem has been in the kernel for a while with
out being noticed as, even with totally random allocation of tasks to
CPUs without any (attempt to balance), there's a quite high probability
of the desirable 2/2 split occurring. So one needs to repeat the test
several times to have reasonable assurance that the problem is not
present. I.e. this has the characteristics of an intermittent bug with
all the debugging problems that introduces.

The probabilities for the 3 split possibilities for random allocation are:

2/2 (the desired outcome) is 3/8 likely,
1/3 is 4/8 likely, and
0/4 is 1/8 likely.

I'm pretty sure that this problem wasn't present when smpnice went into
the kernel which is the last time I did a lot of load balance testing.

Peter
--
Peter Williams pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce