Revert "CPU hotplug, cpusets, suspend: Don't touch cpusets during suspend/resume"
authorLinus Torvalds <>
Wed, 7 Mar 2012 16:21:19 +0000 (08:21 -0800)
committerLinus Torvalds <>
Wed, 7 Mar 2012 16:21:19 +0000 (08:21 -0800)
This reverts commit 8f2f748b0656257153bcf0941df8d6060acc5ca6.

It causes some odd regression that we have not figured out, and it's too
late in the -rc series to try to figure it out now.

As reported by Konstantin Khlebnikov, it causes consistent hangs on his
laptop (Thinkpad x220: 2x cores + HT).  They can be avoided by adding
calls to "rebuild_sched_domains();" in cpuset_cpu_[in]active() for the
clear why, and it makes no sense.

Konstantin's config doesn't even have CONFIG_CPUSETS enabled, just to
make things even more interesting.  So it's not the cpusets, it's just
the scheduling domains.

So until this is understood, revert.

Bisected-reported-and-tested-by: Konstantin Khlebnikov <>
Acked-by: Peter Zijlstra <>
Acked-by: Ingo Molnar <>
Acked-by: Srivatsa S. Bhat <>
Signed-off-by: Linus Torvalds <>

index 33a0676ea74409e7ae66888da26c9934a4139d7c..b342f57879e693f54c12a5b15d1e4e7c5bdde7e1 100644 (file)
@@ -6728,7 +6728,7 @@ int __init sched_create_sysfs_power_savings_entries(struct device *dev)
 static int cpuset_cpu_active(struct notifier_block *nfb, unsigned long action,
                             void *hcpu)
-       switch (action) {
+       switch (action & ~CPU_TASKS_FROZEN) {
        case CPU_ONLINE:
        case CPU_DOWN_FAILED:
@@ -6741,7 +6741,7 @@ static int cpuset_cpu_active(struct notifier_block *nfb, unsigned long action,
 static int cpuset_cpu_inactive(struct notifier_block *nfb, unsigned long action,
                               void *hcpu)
-       switch (action) {
+       switch (action & ~CPU_TASKS_FROZEN) {
        case CPU_DOWN_PREPARE:
                return NOTIFY_OK;