public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@redhat.com>
To: Jason Baron <jbaron@redhat.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	mathieu.desnoyers@polymtl.ca, hpa@zytor.com, tglx@linutronix.de,
	rostedt@goodmis.org, andi@firstfloor.org, roland@redhat.com,
	rth@redhat.com, fweisbec@gmail.com
Subject: Re: [PATCH 1/5] jump label: notifier atomic call chain notrace
Date: Mon, 22 Mar 2010 13:55:04 -0400	[thread overview]
Message-ID: <4BA7AEF8.2030709@redhat.com> (raw)
In-Reply-To: <48e5099e36e4e69d0671e4c16fa8c2f5f3cf5d59.1269272444.git.jbaron@redhat.com>

Jason Baron wrote:
> From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
> 
> In LTTng, being able to use the atomic notifier from cpu idle entry to
> ensure the tracer flush the last events in the current subbuffer
> requires the rcu read-side to be marked "notrace", otherwise it can end
> up calling back into lockdep and the tracer.
> 
> Also apply to the the die notifier.

Looks good for me and it'll be good for kprobe-tracer too:)


> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
> Signed-off-by: Jason Baron <jbaron@redhat.com>

Reviewed-by: Masami Hiramatsu <mhiramat@redhat.com>

> ---
>  kernel/notifier.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/notifier.c b/kernel/notifier.c
> index 2488ba7..88453a7 100644
> --- a/kernel/notifier.c
> +++ b/kernel/notifier.c
> @@ -148,7 +148,7 @@ int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh,
>  	spin_lock_irqsave(&nh->lock, flags);
>  	ret = notifier_chain_unregister(&nh->head, n);
>  	spin_unlock_irqrestore(&nh->lock, flags);
> -	synchronize_rcu();
> +	synchronize_sched();
>  	return ret;
>  }
>  EXPORT_SYMBOL_GPL(atomic_notifier_chain_unregister);
> @@ -178,9 +178,9 @@ int __kprobes __atomic_notifier_call_chain(struct atomic_notifier_head *nh,
>  {
>  	int ret;
>  
> -	rcu_read_lock();
> +	rcu_read_lock_sched_notrace();
>  	ret = notifier_call_chain(&nh->head, val, v, nr_to_call, nr_calls);
> -	rcu_read_unlock();
> +	rcu_read_unlock_sched_notrace();
>  	return ret;
>  }
>  EXPORT_SYMBOL_GPL(__atomic_notifier_call_chain);

-- 
Masami Hiramatsu
e-mail: mhiramat@redhat.com

  reply	other threads:[~2010-03-22 17:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22 16:07 [PATCH 0/5] jump label v5 Jason Baron
2010-03-22 16:07 ` [PATCH 1/5] jump label: notifier atomic call chain notrace Jason Baron
2010-03-22 17:55   ` Masami Hiramatsu [this message]
2010-03-22 16:07 ` [PATCH 2/5] jump label: base patch Jason Baron
2010-03-22 20:04   ` Steven Rostedt
2010-03-22 21:01   ` Avi Kivity
2010-03-26 21:30   ` Masami Hiramatsu
2010-03-22 16:07 ` [PATCH 3/5] jump label: x86 support Jason Baron
2010-03-22 16:40   ` Steven Rostedt
2010-03-22 20:40     ` Jason Baron
2010-03-22 16:07 ` [PATCH 4/5] jump label: tracepoint support Jason Baron
2010-03-22 16:43   ` Steven Rostedt
2010-03-22 20:44     ` Jason Baron
2010-03-22 16:07 ` [PATCH 5/5] jump label: add module support Jason Baron

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=4BA7AEF8.2030709@redhat.com \
    --to=mhiramat@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=roland@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=rth@redhat.com \
    --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