From: Suresh Siddha <suresh.b.siddha@intel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
"hpa@zytor.com" <hpa@zytor.com>,
"trenn@novell.com" <trenn@novell.com>,
"prarit@redhat.com" <prarit@redhat.com>,
"tj@kernel.org" <tj@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Song, Youquan" <youquan.song@intel.com>,
"stable@kernel.org" <stable@kernel.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [patch 1/2] stop_machine: enable __stop_machine() to be called from the cpu online path
Date: Tue, 07 Jun 2011 11:38:22 -0700 [thread overview]
Message-ID: <1307471902.21608.4476.camel@sbsiddha-MOBL3.sc.intel.com> (raw)
In-Reply-To: <20110607180244.GA27552@elte.hu>
On Tue, 2011-06-07 at 11:02 -0700, Ingo Molnar wrote:
> * Suresh Siddha <suresh.b.siddha@intel.com> wrote:
>
> > Currently stop machine infrastructure can be called only from a cpu
> > that is online. But for !CONFIG_SMP, we do allow calling
> > __stop_machine() before the cpu is online.
> >
> > x86 for example requires stop machine infrastructure in the cpu
> > online path and currently implements its own stop machine (using
> > stop_one_cpu_nowait()) for MTRR initialization in the cpu online
> > path.
> >
> > Enhance the __stop_machine() so that it can be called before the
> > cpu is onlined. This will pave the way for code consolidation and
> > address potential deadlocks caused by multiple mechanisms of doing
> > system wide rendezvous.
> >
> > This will also address the behavioral differences of
> > __stop_machine() between SMP and UP builds.
> >
> > Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
> > Cc: stable@kernel.org # v2.6.35+
> > ---
> > kernel/stop_machine.c | 62 +++++++++++++++++++++++++++++++++++++++++++++-----
> > 1 file changed, 57 insertions(+), 5 deletions(-)
>
> This patch is causing problems:
>
> [ 19.835435] BUG: using smp_processor_id() in preemptible [00000000] code: perf/701
> [ 19.838718] caller is __stop_machine+0x3c/0xbe
This is kind of a false positive. We are just checking if the calling
cpu is online/offline (and there is no possible process migration
between an online and offline cpu).
So I can use either raw_smp_processor_id() or probably wrap it around
get/put_cpu()'s. I would prefer raw_smp_processor_id() instead of the
unnecessary get/put_cpu().
We already have preempt disable/enable down this code path and would
like to keep the preempt disable section to the minimum needed code,
instead of increasing it to address this false positive.
Thoughts?
thanks,
suresh
> [ 19.842079] Pid: 701, comm: perf Not tainted 3.0.0-rc2-tip+ #132432
> [ 19.845378] Call Trace:
> [ 19.847838] [<c1112431>] ? debug_smp_processor_id+0xbd/0xd0
> [ 19.848712] [<c1050be6>] ? __stop_machine+0x3c/0xbe
> [ 19.852046] [<c1005b74>] ? text_poke+0xec/0xec
> [ 19.855379] [<c1014447>] ? do_page_fault+0xb0/0x361
> [ 19.858711] [<c1005f00>] ? text_poke_smp+0x48/0x4f
> [ 19.862044] [<c1014447>] ? do_page_fault+0xb0/0x361
> [ 19.865378] [<c100519c>] ? arch_jump_label_transform+0x50/0x64
> [ 19.868712] [<c103d61a>] ? __jump_label_update+0x28/0x39
> [ 19.872044] [<c103d647>] ? jump_label_update+0x1c/0x49
> [ 19.875377] [<c103d892>] ? jump_label_inc+0x38/0x40
> [ 19.878710] [<c105cfaf>] ? perf_swevent_init+0x118/0x129
> [ 19.882044] [<c10625b6>] ? perf_init_event+0x47/0x7c
> [ 19.885376] [<c10627f7>] ? perf_event_alloc+0x20c/0x416
> [ 19.888710] [<c1062fb1>] ? sys_perf_event_open+0x313/0x634
> [ 19.892042] [<c101469a>] ? do_page_fault+0x303/0x361
> [ 19.895379] [<c1281e70>] ? sysenter_do_call+0x12/0x26
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2011-06-07 18:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-06 23:16 [patch 0/2] enhance stop machine infrastructure for MTRR rendezvous sequence Suresh Siddha
2011-06-06 23:16 ` [patch 1/2] stop_machine: enable __stop_machine() to be called from the cpu online path Suresh Siddha
2011-06-07 0:19 ` [tip:x86/urgent] x86, stop_machine: Enable " tip-bot for Suresh Siddha
2011-06-07 18:02 ` [patch 1/2] stop_machine: enable " Ingo Molnar
2011-06-07 18:38 ` Suresh Siddha [this message]
2011-06-07 18:42 ` H. Peter Anvin
2011-06-07 19:12 ` Suresh Siddha
2011-06-06 23:16 ` [patch 2/2] x86, mtrr: use __stop_machine() for doing MTRR rendezvous Suresh Siddha
2011-06-07 0:19 ` [tip:x86/urgent] x86, mtrr: Use " tip-bot for 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=1307471902.21608.4476.camel@sbsiddha-MOBL3.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=prarit@redhat.com \
--cc=rostedt@goodmis.org \
--cc=rusty@rustcorp.com.au \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=trenn@novell.com \
--cc=youquan.song@intel.com \
/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
all inboxes | Powered by JetHome®