public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Arjan van de Ven <arjan@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andi Kleen <andi@firstfloor.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] x86: stop machine text poke should issue sync core
Date: Thu, 3 Mar 2011 10:53:57 -0500	[thread overview]
Message-ID: <20110303155357.GA1590@Krystal> (raw)
In-Reply-To: <4D6F3D1B.3030005@hitachi.com>

* Masami Hiramatsu (masami.hiramatsu.pt@hitachi.com) wrote:
> (2011/03/03 15:10), H. Peter Anvin wrote:
> > On 02/28/2011 07:24 AM, Mathieu Desnoyers wrote:
> >>
> >> Index: linux-2.6-lttng/arch/x86/kernel/alternative.c
> >> ===================================================================
> >> --- linux-2.6-lttng.orig/arch/x86/kernel/alternative.c
> >> +++ linux-2.6-lttng/arch/x86/kernel/alternative.c
> >> @@ -612,6 +612,12 @@ static int __kprobes stop_machine_text_p
> >>  
> >>  	flush_icache_range((unsigned long)tpp->addr,
> >>  			   (unsigned long)tpp->addr + tpp->len);
> >> +	/*
> >> +	 * Intel Archiecture Software Developer's Manual section 7.1.3 specifies
> >> +	 * that a core serializing instruction such as "cpuid" should be
> >> +	 * executed on _each_ core before the new instruction is made visible.
> >> +	 */
> >> +	sync_core();
> >>  	return 0;
> >>  }
> >>  
> > 
> > Isn't this executed from an IPI handler, which will return with IRET (a
> > serializing instruction) anyway?
> 
> No, now stop_machine uses per-cpu workqueue, so that handler will be
> executed from worker threads. There is no iret anymore.
> 
> BTW, Mathieu, since the latest kernel has batch-text_poke_smp, this patch
> needs to be updated.

OK, I'll update the patch and respin it.

Thanks,

Mathieu

> 
> Thank you,
> 
> -- 
> Masami HIRAMATSU
> 2nd Dept. Linux Technology Center
> Hitachi, Ltd., Systems Development Laboratory
> E-mail: masami.hiramatsu.pt@hitachi.com

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

      reply	other threads:[~2011-03-03 15:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 15:24 [RFC PATCH] x86: stop machine text poke should issue sync core Mathieu Desnoyers
2011-03-03  5:27 ` Masami Hiramatsu
2011-03-03  6:10 ` H. Peter Anvin
2011-03-03  7:02   ` Masami Hiramatsu
2011-03-03 15:53     ` Mathieu Desnoyers [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=20110303155357.GA1590@Krystal \
    --to=mathieu.desnoyers@efficios.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=arjan@infradead.org \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --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