All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] CPU hotplug, cpusets: Fix CPU online handling related to cpusets
@ 2012-02-07 18:55 Srivatsa S. Bhat
  2012-02-07 18:56 ` [PATCH 1/4] CPU hotplug, cpuset: Maintain a copy of the cpus_allowed mask before CPU hotplug Srivatsa S. Bhat
                   ` (4 more replies)
  0 siblings, 5 replies; 32+ messages in thread
From: Srivatsa S. Bhat @ 2012-02-07 18:55 UTC (permalink / raw)
  To: paul, a.p.zijlstra, mingo, rjw, tj
  Cc: frank.rowand, pjt, tglx, lizf, prashanth, paulmck, vatsa,
	srivatsa.bhat, linux-kernel, linux-pm

There is a very long standing issue related to how cpusets handle CPU
hotplug events. The problem is that when a CPU goes offline, it is removed
from all cpusets. However, when that CPU comes back online, it is added
*only* to the root cpuset. Which means, any task attached to a cpuset lower
in the hierarchy will have one CPU less in its cpuset, though it had this
CPU in its cpuset before the CPU went offline.

The issue gets enormously aggravated in the case of suspend/resume. During
suspend, all non-boot CPUs are taken offline. Which means, all those CPUs
get removed from all the cpusets. When the system resumes, all CPUs are
brought back online; however, the newly onlined CPUs get added only to the
root cpuset - and all other cpusets have cpuset.cpus = 0 (boot cpu alone)!
This means, (as is obvious), all those tasks attached to non-root cpusets
will be constrained to run only on one single cpu!

So, imagine the amount of performance degradation after suspend/resume!!

In particular, libvirt is one of the active users of cpusets. And apparently,
people hit this problem long ago:
https://bugzilla.redhat.com/show_bug.cgi?id=714271

But unfortunately this never got resolved since people probably thought that
the bug was in libvirt... and all this time the kernel was the culprit!

--
 Srivatsa S. Bhat (4):
      CPU hotplug, cpuset: Maintain a copy of the cpus_allowed mask before CPU hotplug
      cpuset: Split up update_cpumask() so that its functionality can be reused
      cpuset: Add function to introduce CPUs to cpusets during CPU online
      CPU hotplug, cpusets: Differentiate the CPU online and CPU offline callbacks


  include/linux/cpuset.h |    4 +
 kernel/cpuset.c        |  177 +++++++++++++++++++++++++++++++++++++++++-------
 kernel/sched/core.c    |   12 +++
 3 files changed, 163 insertions(+), 30 deletions(-)


Regards,
Srivatsa S. Bhat
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2012-02-27 12:10 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-07 18:55 [PATCH 0/4] CPU hotplug, cpusets: Fix CPU online handling related to cpusets Srivatsa S. Bhat
2012-02-07 18:56 ` [PATCH 1/4] CPU hotplug, cpuset: Maintain a copy of the cpus_allowed mask before CPU hotplug Srivatsa S. Bhat
2012-02-07 18:56 ` [PATCH 2/4] cpuset: Split up update_cpumask() so that its functionality can be reused Srivatsa S. Bhat
2012-02-07 18:57 ` [PATCH 3/4] cpuset: Add function to introduce CPUs to cpusets during CPU online Srivatsa S. Bhat
2012-02-07 18:57 ` [PATCH 4/4] CPU hotplug, cpusets: Differentiate the CPU online and CPU offline callbacks Srivatsa S. Bhat
2012-02-08  3:22 ` [PATCH 0/4] CPU hotplug, cpusets: Fix CPU online handling related to cpusets Peter Zijlstra
2012-02-08  6:33   ` Srivatsa S. Bhat
2012-02-09  7:57     ` Ingo Molnar
2012-02-09  8:42       ` Srivatsa S. Bhat
2012-02-09 15:11         ` Ingo Molnar
2012-02-10 15:52           ` Peter Zijlstra
2012-02-10 16:53             ` Paul E. McKenney
2012-02-10 17:34               ` Peter Zijlstra
2012-02-10 21:51                 ` Alan Stern
2012-02-10 22:39                   ` Rafael J. Wysocki
2012-02-11  2:07                     ` Peter Zijlstra
2012-02-11  4:26                       ` Srivatsa S. Bhat
2012-02-13 17:47                         ` Srivatsa S. Bhat
2012-02-17 12:15                           ` Srivatsa S. Bhat
2012-02-20 12:49                             ` Peter Zijlstra
2012-02-20 12:59                               ` Srivatsa S. Bhat
2012-02-23  9:57                                 ` Srivatsa S. Bhat
2012-02-24 23:24                                   ` Rafael J. Wysocki
2012-02-27 10:18                                   ` Peter Zijlstra
2012-02-27 12:09                                   ` [tip:sched/urgent] CPU hotplug, cpusets, suspend: Don' t touch cpusets during suspend/resume tip-bot for Srivatsa S. Bhat
2012-02-11 16:00                 ` [PATCH 0/4] CPU hotplug, cpusets: Fix CPU online handling related to cpusets Paul E. McKenney
2012-02-13 17:47               ` Srivatsa S. Bhat
2012-02-13 20:39                 ` Paul E. McKenney
2012-02-13 20:49                   ` Srivatsa S. Bhat
2012-02-11 13:39             ` Ingo Molnar
2012-02-10 15:53         ` Peter Zijlstra
2012-02-09 16:43     ` Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.