All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>, lkml <linux-kernel@vger.kernel.org>,
	systemtap <systemtap@sources.redhat.com>,
	DLE <dle-develop@lists.sourceforge.net>,
	Jason Baron <jbaron@redhat.com>
Subject: Re: [PATCH -tip] x86: Issue at least one memory barrier in stop_machine_text_poke().
Date: Wed, 3 Mar 2010 16:48:57 -0500	[thread overview]
Message-ID: <20100303214856.GA26640@Krystal> (raw)
In-Reply-To: <20100303214847.26177.98280.stgit@localhost6.localdomain6>

* Masami Hiramatsu (mhiramat@redhat.com) wrote:
> Fix stop_machine_text_poke() to issue smp_mb() before exiting waiting
> loop, and use cpu_relax() for waiting.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

> 
> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Jason Baron <jbaron@redhat.com>
> ---
> 
>  arch/x86/kernel/alternative.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
> index 635e4f4..3a4bf35 100644
> --- a/arch/x86/kernel/alternative.c
> +++ b/arch/x86/kernel/alternative.c
> @@ -597,8 +597,8 @@ static int __kprobes stop_machine_text_poke(void *data)
>  		wrote_text = 1;
>  	} else {
>  		while (!wrote_text)
> -			smp_rmb();
> -		sync_core();
> +			cpu_relax();
> +		smp_mb();	/* Load wrote_text before following execution */
>  	}
>  
>  	flush_icache_range((unsigned long)tpp->addr,
> 
> 
> -- 
> Masami Hiramatsu
> 
> Software Engineer
> Hitachi Computer Products (America), Inc.
> Software Solutions Division
> 
> e-mail: mhiramat@redhat.com

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

      reply	other threads:[~2010-03-03 21:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03 21:26 [PATCH -tip 1/2] perf probe: Correct probe syntax on command line help Masami Hiramatsu
2010-03-03 21:27 ` [PATCH -tip 2/2] x86: Issue at least one memory barrier in stop_machine_text_poke() Masami Hiramatsu
2010-03-03 21:36   ` Mathieu Desnoyers
2010-03-03 21:39     ` Masami Hiramatsu
2010-03-03 21:48     ` [PATCH -tip] " Masami Hiramatsu
2010-03-03 21:48       ` 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=20100303214856.GA26640@Krystal \
    --to=mathieu.desnoyers@efficios.com \
    --cc=dle-develop@lists.sourceforge.net \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=systemtap@sources.redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.