From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Jason Baron <jbaron@redhat.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, hpa@zytor.com,
tglx@linutronix.de, rostedt@goodmis.org, andi@firstfloor.org,
roland@redhat.com, rth@redhat.com, mhiramat@redhat.com,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH] notifier atomic call chain notrace
Date: Wed, 18 Nov 2009 18:38:15 -0500 [thread overview]
Message-ID: <20091118233815.GA28962@Krystal> (raw)
In-Reply-To: <14acd28665b633909f7e9873861075fd657e9a52.1258580048.git.jbaron@redhat.com>
* Jason Baron (jbaron@redhat.com) wrote:
> Note that this is conditional on gcc >= 4.5. Also there is a !lockdep
> condition. This is b/c the die_notifier takes an rcu_read_lock() on the
> int3 trap, which then causes another one etc. Since, we aren't going to be
> installing removing the handler, the rcu_read_lock() could be avoided for this
> case with some code restructuring.
>
[snip]
Would the following patch help ? I use it in the LTTng tree to alleviate
this problem.
notifier atomic call chain notrace
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.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
CC: Jason Baron <jbaron@redhat.com>
CC: mingo@elte.hu
---
kernel/notifier.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-2.6-lttng/kernel/notifier.c
===================================================================
--- linux-2.6-lttng.orig/kernel/notifier.c 2009-11-12 17:58:56.000000000 -0500
+++ linux-2.6-lttng/kernel/notifier.c 2009-11-12 18:03:28.000000000 -0500
@@ -148,7 +148,7 @@ int atomic_notifier_chain_unregister(str
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_cha
{
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);
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
next prev parent reply other threads:[~2009-11-18 23:38 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 22:43 [RFC PATCH 0/6] jump label v3 Jason Baron
2009-11-18 22:43 ` [RFC PATCH 1/6] jump label v3 - kprobes/x86: Cleanup RELATIVEJUMP_INSTRUCTION to RELATIVEJUMP_OPCODE Jason Baron
2009-11-18 22:43 ` [RFC PATCH 2/6] jump label v3 - x86: Introduce generic jump patching without stop_machine Jason Baron
2009-11-19 0:28 ` Mathieu Desnoyers
2009-11-19 0:58 ` Paul E. McKenney
2009-11-19 1:22 ` Steven Rostedt
2009-11-19 1:39 ` Paul E. McKenney
2009-11-19 1:57 ` Mathieu Desnoyers
2009-11-19 4:16 ` Paul E. McKenney
2009-11-19 14:04 ` Masami Hiramatsu
2009-11-19 16:03 ` Mathieu Desnoyers
2009-11-20 1:00 ` Masami Hiramatsu
2009-11-21 15:32 ` Mathieu Desnoyers
2009-11-21 1:11 ` Masami Hiramatsu
2009-11-21 15:38 ` Mathieu Desnoyers
2009-11-20 21:54 ` H. Peter Anvin
2009-11-21 0:06 ` Masami Hiramatsu
2009-11-21 0:19 ` H. Peter Anvin
2009-11-21 16:21 ` Mathieu Desnoyers
2009-11-21 21:55 ` Masami Hiramatsu
2009-11-22 1:46 ` Mathieu Desnoyers
2009-11-21 16:12 ` Mathieu Desnoyers
2009-11-18 22:43 ` [RFC PATCH 3/6] jump label v3 - move opcode defs Jason Baron
2009-11-18 22:43 ` [RFC PATCH 4/6] jump label v3 - base patch Jason Baron
2009-11-18 23:38 ` Mathieu Desnoyers [this message]
2009-11-19 0:02 ` [PATCH] notifier atomic call chain notrace Paul E. McKenney
2009-11-19 3:59 ` Masami Hiramatsu
2009-11-19 16:48 ` Jason Baron
2009-11-18 22:43 ` [RFC PATCH 5/6] jump label v3 - add module support Jason Baron
2009-11-18 22:43 ` [RFC PATCH 6/6] jump label v3 - tracepoint support Jason Baron
2009-11-18 22:51 ` [RFC PATCH 0/6] jump label v3 H. Peter Anvin
2009-11-18 23:07 ` Roland McGrath
2009-11-18 23:18 ` H. Peter Anvin
2009-11-19 3:54 ` Roland McGrath
2009-11-19 21:55 ` 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=20091118233815.GA28962@Krystal \
--to=mathieu.desnoyers@polymtl.ca \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=jbaron@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--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