linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] [PATCH] printk: Don't emit console_cpu_notify() for CPU_DYING
@ 2011-11-18  2:19 Yong Zhang
  2011-11-18 19:01 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Yong Zhang @ 2011-11-18  2:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Ingo Molnar, James Morris, Peter Zijlstra,
	Kevin Cernekee, Thomas Gleixner, Steven Rostedt

When running -rt, I got some warning when doing cpu hotplug,
for details please check:
http://marc.info/?l=linux-kernel&m=132143661616297&w=2

But seems the problem also exists in mainline, a typical
scenario is:

        CPU A                           CPU B

doing printk with console_sem held
                                take_cpu_down();
                                  cpu_notify(CPU_DYING);
                                    console_cpu_notify();
                                      console_lock();
                                        down(&console_sem);
                                          *BANG*
  up(&console_sem);


Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: James Morris <jmorris@namei.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/printk.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/kernel/printk.c b/kernel/printk.c
index 535bc3b..ba0393e 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1223,7 +1223,6 @@ static int __cpuinit console_cpu_notify(struct notifier_block *self,
 	switch (action) {
 	case CPU_ONLINE:
 	case CPU_DEAD:
-	case CPU_DYING:
 	case CPU_DOWN_FAILED:
 	case CPU_UP_CANCELED:
 		console_lock();
-- 
1.7.5.4


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

end of thread, other threads:[~2011-11-19  5:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-18  2:19 [RFC] [PATCH] printk: Don't emit console_cpu_notify() for CPU_DYING Yong Zhang
2011-11-18 19:01 ` Andrew Morton
2011-11-19  5:15   ` Yong Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).