From: Yong Zhang <yong.zhang0@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
James Morris <jmorris@namei.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Kevin Cernekee <cernekee@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [RFC] [PATCH] printk: Don't emit console_cpu_notify() for CPU_DYING
Date: Sat, 19 Nov 2011 13:15:37 +0800 [thread overview]
Message-ID: <20111119051537.GA2163@zhy> (raw)
In-Reply-To: <20111118110100.1cedc784.akpm@linux-foundation.org>
On Fri, Nov 18, 2011 at 11:01:00AM -0800, Andrew Morton wrote:
> On Fri, 18 Nov 2011 10:19:24 +0800
> Yong Zhang <yong.zhang0@gmail.com> wrote:
>
> > 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);
>
> This doesn't describe a deadlock. For a deadlock to occur, something
> must prevent CPU A from proceeding to the up().
Hmm, after revisting the code, seems console_unlock() can't be
preempted when helding console_sem. IOW, stop_machine() can't
run if someone loops in printing something.
So the problem only affect -rt, sorry for the noise.
Thanks,
Yong
>
> Are you able to more fully describe this? I'm suspecting that CPU A
> got shut down by CPU B? If so, shutting down a CPU while it holds
> locks seems rather bad. Or perhaps it's something else...
prev parent reply other threads:[~2011-11-19 5:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111119051537.GA2163@zhy \
--to=yong.zhang0@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=cernekee@gmail.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).