From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: [for-next][PATCH 17/18] ftrace/cpuidle/x86: Mark functions that are RCU unsafe
Date: Wed, 04 Sep 2013 10:36:09 -0400 [thread overview]
Message-ID: <20130904143703.098712210@goodmis.org> (raw)
In-Reply-To: 20130904143552.456506259@goodmis.org
[-- Attachment #1: 0016-ftrace-cpuidle-x86-Mark-functions-that-are-RCU-unsaf.patch --]
[-- Type: text/plain, Size: 2323 bytes --]
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
Some callbacks of the function tracer use rcu_read_lock(). This means that
there's places that can not be traced because RCU is not tracking the CPU
for various reasons (like NO_HZ_FULL and coming back from userspace).
These functions need to be marked so that callbacks that use RCU do not
trace them.
Acked-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
arch/x86/kernel/process.c | 2 ++
drivers/cpuidle/cpuidle.c | 2 ++
kernel/cpu/idle.c | 2 ++
3 files changed, 6 insertions(+)
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 83369e5..18739cd 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -17,6 +17,7 @@
#include <linux/stackprotector.h>
#include <linux/tick.h>
#include <linux/cpuidle.h>
+#include <linux/ftrace.h>
#include <trace/events/power.h>
#include <linux/hw_breakpoint.h>
#include <asm/cpu.h>
@@ -316,6 +317,7 @@ void default_idle(void)
#ifdef CONFIG_APM_MODULE
EXPORT_SYMBOL(default_idle);
#endif
+FTRACE_UNSAFE_RCU(default_idle);
#ifdef CONFIG_XEN
bool xen_set_default_idle(void)
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index fdc432f..9515457 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -19,6 +19,7 @@
#include <linux/ktime.h>
#include <linux/hrtimer.h>
#include <linux/module.h>
+#include <linux/ftrace.h>
#include <trace/events/power.h>
#include "cpuidle.h"
@@ -168,6 +169,7 @@ int cpuidle_idle_call(void)
return 0;
}
+FTRACE_UNSAFE_RCU(cpuidle_idle_call);
/**
* cpuidle_install_idle_handler - installs the cpuidle idle loop handler
diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c
index e695c0a..d9d290f 100644
--- a/kernel/cpu/idle.c
+++ b/kernel/cpu/idle.c
@@ -5,6 +5,7 @@
#include <linux/cpu.h>
#include <linux/tick.h>
#include <linux/mm.h>
+#include <linux/ftrace.h>
#include <linux/stackprotector.h>
#include <asm/tlb.h>
@@ -61,6 +62,7 @@ void __weak arch_cpu_idle(void)
cpu_idle_force_poll = 1;
local_irq_enable();
}
+FTRACE_UNSAFE_RCU(arch_cpu_idle);
/*
* Generic idle loop implementation
--
1.7.10.4
next prev parent reply other threads:[~2013-09-04 14:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-04 14:35 [for-next][PATCH 00/18] ftrace/rcu: Handle unsafe RCU functions and ftrace callbacks Steven Rostedt
2013-09-04 14:35 ` [for-next][PATCH 01/18] tracing: Make tracing_cpumask available for all instances Steven Rostedt
2013-09-04 14:35 ` [for-next][PATCH 02/18] ftrace: Fix a slight race in modifying what function callback gets traced Steven Rostedt
2013-09-04 14:35 ` [for-next][PATCH 03/18] ftrace/rcu: Do not trace debug_lockdep_rcu_enabled() Steven Rostedt
2013-09-04 14:35 ` [for-next][PATCH 04/18] ftrace: Add hash list to save RCU unsafe functions Steven Rostedt
2013-09-04 14:35 ` [for-next][PATCH 05/18] ftrace: Do not set ftrace records for unsafe RCU when not allowed Steven Rostedt
2013-09-04 14:35 ` [for-next][PATCH 06/18] ftrace: Set ftrace internal function tracing RCU safe Steven Rostedt
2013-09-04 14:35 ` [for-next][PATCH 07/18] ftrace: Add test for ops against unsafe RCU functions in callback Steven Rostedt
2013-09-04 14:36 ` [for-next][PATCH 08/18] ftrace: Do not display non safe RCU functions in available_filter_functions Steven Rostedt
2013-09-04 14:36 ` [for-next][PATCH 09/18] ftrace: Add rcu_unsafe_filter_functions file Steven Rostedt
2013-09-04 14:36 ` [for-next][PATCH 10/18] ftrace: Add selftest to check if RCU unsafe functions are filtered properly Steven Rostedt
2013-09-04 14:36 ` [for-next][PATCH 11/18] ftrace: Create a RCU unsafe checker Steven Rostedt
2013-09-04 14:36 ` [for-next][PATCH 12/18] ftrace: Add infrastructure to stop RCU unsafe checker from checking Steven Rostedt
2013-09-04 14:36 ` [for-next][PATCH 13/18] ftrace: Disable RCU unsafe checker when function graph is enabled Steven Rostedt
2013-09-04 14:36 ` [for-next][PATCH 14/18] ftrace: Disable the RCU unsafe checker when irqsoff " Steven Rostedt
2013-09-04 14:36 ` [for-next][PATCH 15/18] ftrace/lockdep: Have the RCU lockdep splat show what function triggered Steven Rostedt
2013-09-04 14:36 ` [for-next][PATCH 16/18] ftrace/rcu: Mark functions that are RCU unsafe Steven Rostedt
2013-09-04 16:43 ` Steven Rostedt
2013-09-04 14:36 ` Steven Rostedt [this message]
2013-09-04 14:36 ` [for-next][PATCH 18/18] ftrace: Print a message when the rcu checker is disabled Steven Rostedt
2013-09-04 18:27 ` [for-next][PATCH 00/18] ftrace/rcu: Handle unsafe RCU functions and ftrace callbacks Steven Rostedt
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=20130904143703.098712210@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.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