]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
sched: Improve scalability via 'CPU buddies', which withstand random perturbations
authorMike Galbraith <efault@gmx.de>
Tue, 12 Jun 2012 03:18:32 +0000 (05:18 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 24 Jul 2012 11:53:34 +0000 (13:53 +0200)
commit970e178985cadbca660feb02f4d2ee3a09f7fdda
tree20f47abb069a5d13940e8cdc48dae5f5563eb59a
parenta1cd2b13f754b2c56fb87b8c4912c015f8f57c0c
sched: Improve scalability via 'CPU buddies', which withstand random perturbations

Traversing an entire package is not only expensive, it also leads to tasks
bouncing all over a partially idle and possible quite large package.  Fix
that up by assigning a 'buddy' CPU to try to motivate.  Each buddy may try
to motivate that one other CPU, if it's busy, tough, it may then try its
SMT sibling, but that's all this optimization is allowed to cost.

Sibling cache buddies are cross-wired to prevent bouncing.

4 socket 40 core + SMT Westmere box, single 30 sec tbench runs, higher is better:

 clients     1       2       4        8       16       32       64      128
 ..........................................................................
 pre        30      41     118      645     3769     6214    12233    14312
 post      299     603    1211     2418     4697     6847    11606    14557

A nice increase in performance.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1339471112.7352.32.camel@marge.simpson.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/sched.h
kernel/sched/core.c
kernel/sched/fair.c