[RFC][PATCH 18/18 v2] ftrace/sched: Mark functions that are RCU unsafe

From: Steven Rostedt
Date: Sat Aug 31 2013 - 01:18:41 EST


From: "Steven Rostedt (Red Hat)" <rostedt@xxxxxxxxxxx>

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).

Thes functions need to be marked so that callbacks that use RCU do not
trace them.

Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
kernel/sched/core.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b7c32cb..9bd2aea 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1440,6 +1440,7 @@ void scheduler_ipi(void)
}
irq_exit();
}
+FTRACE_UNSAFE_RCU(scheduler_ipi);

static void ttwu_queue_remote(struct task_struct *p, int cpu)
{
@@ -3222,6 +3223,7 @@ int idle_cpu(int cpu)

return 1;
}
+FTRACE_UNSAFE_RCU(idle_cpu);

/**
* idle_task - return the idle task for a given cpu.
--
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/