Re: [RFC] scheduler: improve SMP fairness in CFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Tong Li <[email protected]> wrote:

> This patch extends CFS to achieve better fairness for SMPs. For 
> example, with 10 tasks (same priority) on 8 CPUs, it enables each task 
> to receive equal CPU time (80%). [...]

hm, CFS should already offer reasonable long-term SMP fairness. It 
certainly works on a dual-core box, i just started 3 tasks of the same 
priority on 2 CPUs, and on vanilla 2.6.23-rc1 the distribution is this:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 7084 mingo     20   0  1576  248  196 R   67  0.0   0:50.13 loop
 7083 mingo     20   0  1576  244  196 R   66  0.0   0:48.86 loop
 7085 mingo     20   0  1576  244  196 R   66  0.0   0:49.45 loop

so each task gets a perfect 66% of CPU time.

prior CFS, we indeed did a 50%/50%/100% split - so for example on 
v2.6.22:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2256 mingo     25   0  1580  248  196 R  100  0.0   1:03.19 loop
 2255 mingo     25   0  1580  248  196 R   50  0.0   0:31.79 loop
 2257 mingo     25   0  1580  248  196 R   50  0.0   0:31.69 loop

but CFS has changed that behavior.

I'll check your 10-tasks-on-8-cpus example on an 8-way box too, maybe we 
regressed somewhere ...

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux