[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-51a96c77815e7f139892a6e9c8275a50e9baebdf@git.kernel.org>
Date: Tue, 23 Nov 2010 10:22:54 GMT
From: tip-bot for Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
a.p.zijlstra@...llo.nl, oleg@...hat.com, tglx@...utronix.de,
mingo@...e.hu
Subject: [tip:sched/core] cpu: Remove incorrect BUG_ON
Commit-ID: 51a96c77815e7f139892a6e9c8275a50e9baebdf
Gitweb: http://git.kernel.org/tip/51a96c77815e7f139892a6e9c8275a50e9baebdf
Author: Peter Zijlstra <a.p.zijlstra@...llo.nl>
AuthorDate: Fri, 19 Nov 2010 20:37:53 +0100
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 23 Nov 2010 10:29:08 +0100
cpu: Remove incorrect BUG_ON
Oleg mentioned that there is no actual guarantee the dying cpu's
migration thread is actually finished running when we get there, so
replace the BUG_ON() with a spinloop waiting for it.
Reported-by: Oleg Nesterov <oleg@...hat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
kernel/cpu.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 3945066..cb7a1ef 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -249,8 +249,11 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
* The migration_call() CPU_DYING callback will have removed all
* runnable tasks from the cpu, there's only the idle task left now
* that the migration thread is done doing the stop_machine thing.
+ *
+ * Wait for the stop thread to go away.
*/
- BUG_ON(!idle_cpu(cpu));
+ while (!idle_cpu(cpu))
+ cpu_relax();
/* This actually kills the CPU. */
__cpu_die(cpu);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists