public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>,
	Arjan van de Ven <arjan@infradead.org>
Cc: Steven Rostedt <srostedt@redhat.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH 3/5] ftrace: do not trace nmi callers in RCU
Date: Tue, 29 Jul 2008 21:29:42 -0400	[thread overview]
Message-ID: <20080730014351.037013056@goodmis.org> (raw)
In-Reply-To: 20080730012939.885172468@goodmis.org

[-- Attachment #1: ftrace-no-trace-rcu-nmi.patch --]
[-- Type: text/plain, Size: 1894 bytes --]

The dynamic ftrace code performs run time modification of the code text
section. This is not safe to do unless all other CPUS are halted. Because
there is no good way to halt NMIs while doing the modification, we must
make sure that the NMIs will not execute code that will be modified.

This patch adds notrace annotation to functions called by NMIs in RCU.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/rcupreempt.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-tip.git/kernel/rcupreempt.c
===================================================================
--- linux-tip.git.orig/kernel/rcupreempt.c	2008-07-29 20:12:05.000000000 -0400
+++ linux-tip.git/kernel/rcupreempt.c	2008-07-29 20:13:52.000000000 -0400
@@ -240,7 +240,7 @@ long rcu_batches_completed(void)
 }
 EXPORT_SYMBOL_GPL(rcu_batches_completed);
 
-void __rcu_read_lock(void)
+notrace void __rcu_read_lock(void)
 {
 	int idx;
 	struct task_struct *t = current;
@@ -306,7 +306,7 @@ void __rcu_read_lock(void)
 }
 EXPORT_SYMBOL_GPL(__rcu_read_lock);
 
-void __rcu_read_unlock(void)
+notrace void __rcu_read_unlock(void)
 {
 	int idx;
 	struct task_struct *t = current;
@@ -448,7 +448,7 @@ static DEFINE_PER_CPU(int, rcu_update_fl
  * rcu_dyntick_sched.dynticks to let the RCU handling know that the
  * CPU is active.
  */
-void rcu_irq_enter(void)
+notrace void rcu_irq_enter(void)
 {
 	int cpu = smp_processor_id();
 	struct rcu_dyntick_sched *rdssp = &per_cpu(rcu_dyntick_sched, cpu);
@@ -518,7 +518,7 @@ void rcu_irq_enter(void)
  * rcu_dyntick_sched.dynticks to put let the RCU handling be
  * aware that the CPU is going back to idle with no ticks.
  */
-void rcu_irq_exit(void)
+notrace void rcu_irq_exit(void)
 {
 	int cpu = smp_processor_id();
 	struct rcu_dyntick_sched *rdssp = &per_cpu(rcu_dyntick_sched, cpu);

-- 

  parent reply	other threads:[~2008-07-30  1:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30  1:29 [PATCH 0/5] ftrace: do not trace NMI handlers Steven Rostedt
2008-07-30  1:29 ` [PATCH 1/5] ftrace: do not trace nmi callers in x86 Steven Rostedt
2008-07-30  1:29 ` [PATCH 2/5] ftrace: do not trace nmi callers in drivers Steven Rostedt
2008-07-30  1:29 ` Steven Rostedt [this message]
2008-07-30  1:29 ` [PATCH 4/5] ftrace: do not trace nmi callers in kernel directory Steven Rostedt
2008-07-30  1:29 ` [PATCH 5/5] ftrace: warn on NMI calling code that may be modified Steven Rostedt
2008-07-30  7:28 ` [PATCH 0/5] ftrace: do not trace NMI handlers Peter Zijlstra
2008-07-30 14:04   ` Mathieu Desnoyers
2008-07-30 14:23     ` Mathieu Desnoyers

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=20080730014351.037013056@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=srostedt@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@osdl.org \
    /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