From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Tejun Heo <tj@kernel.org>, "x86@kernel.org" <x86@kernel.org>,
"mingo@elte.hu" <mingo@elte.hu>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] stop_machine: kill __stop_machine()
Date: Thu, 16 Jun 2011 19:55:10 +0200 [thread overview]
Message-ID: <1308246910.13240.238.camel@twins> (raw)
In-Reply-To: <1308245872.2682.369.camel@sbsiddha-MOBL3.sc.intel.com>
On Thu, 2011-06-16 at 10:37 -0700, Suresh Siddha wrote:
> On Thu, 2011-06-16 at 05:12 -0700, Peter Zijlstra wrote:
> > On Tue, 2011-06-14 at 19:06 +0200, Tejun Heo wrote:
> > Please have a look at:
> >
> > ---
> > commit d91309f69b7bdb64aeb30106fde8d18c5dd354b5
> > Author: Peter Zijlstra <peterz@infradead.org>
> > Date: Fri Feb 11 22:07:46 2011 +0100
> >
> > x86: Fix text_poke_smp_batch() deadlock
> >
> > Fix this deadlock - we are already holding the mutex:
> >
> ...
> > diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
> > index 1236085..7038b95 100644
> > --- a/arch/x86/kernel/alternative.c
> > +++ b/arch/x86/kernel/alternative.c
> > @@ -671,7 +671,7 @@ void __kprobes text_poke_smp_batch(struct text_poke_param *params, int n)
> >
> > atomic_set(&stop_machine_first, 1);
> > wrote_text = 0;
> > - stop_machine(stop_machine_text_poke, (void *)&tpp, NULL);
> > + __stop_machine(stop_machine_text_poke, (void *)&tpp, NULL);
> > }
> >
> > #if defined(CONFIG_DYNAMIC_FTRACE) || defined(HAVE_JUMP_LABEL)
> >
>
> Peter, So it looks like we are allowing a new cpu to come online in
> parallel, while we poke the text? Isn't it a problem? What am I missing?
the caller already did get_online_cpus(),
do_optimize_kprobes()
get_online_cpus()
arch_optimize_kprobes()
text_poke_smp_batch()
put_online_cpus()
next prev parent reply other threads:[~2011-06-16 19:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 17:06 [PATCHSET] stop_machine: implement stop_machine_from_offline_cpu() Tejun Heo
2011-06-14 17:06 ` [PATCH 1/3] stop_machine: kill __stop_machine() Tejun Heo
2011-06-16 12:12 ` Peter Zijlstra
2011-06-16 12:44 ` Tejun Heo
2011-06-16 17:37 ` Suresh Siddha
2011-06-16 17:55 ` Peter Zijlstra [this message]
2011-06-16 18:17 ` Suresh Siddha
2011-06-16 18:28 ` Tejun Heo
2011-06-16 18:36 ` Peter Zijlstra
2011-06-16 18:44 ` Suresh Siddha
2011-06-16 18:28 ` Peter Zijlstra
2011-06-14 17:06 ` [PATCH 2/3] stop_machine: reorganize stop_cpus() implementation Tejun Heo
2011-06-14 17:06 ` [PATCH 3/3] stop_machine: implement stop_machine_from_offline_cpu() Tejun Heo
2011-06-16 12:10 ` [PATCHSET] " Peter Zijlstra
2011-06-16 12:15 ` Tejun Heo
2011-06-16 17:21 ` Suresh Siddha
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=1308246910.13240.238.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/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