lkml.org 
[lkml]   [2013]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RFC][PATCH 18/18 v2] ftrace/sched: Mark functions that are RCU unsafe
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).

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

Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
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



\
 
 \ /
  Last update: 2013-08-31 07:41    [W:1.325 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site