]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
tracing/ftrace: use preempt_enable_no_resched_notrace in ring_buffer_time_stamp()
authorFrederic Weisbecker <fweisbec@gmail.com>
Tue, 16 Dec 2008 21:08:58 +0000 (22:08 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 16 Dec 2008 23:26:35 +0000 (00:26 +0100)
Impact: prevent a trace recursion

After some tests with function graph tracer under x86-32, I saw some recursions
caused by ring_buffer_time_stamp() that calls preempt_enable_no_notrace() which
calls preempt_schedule() which is traced itself.

This patch re-enables preemption without rescheduling.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/ring_buffer.c

index 7f69cfeaadf76a1bc002df343d2006ed20204a5e..eab81f918f6a0afe40cf5bcfb6f1e869213c26a4 100644 (file)
@@ -107,7 +107,7 @@ u64 ring_buffer_time_stamp(int cpu)
        preempt_disable_notrace();
        /* shift to debug/test normalization and TIME_EXTENTS */
        time = sched_clock() << DEBUG_SHIFT;
-       preempt_enable_notrace();
+       preempt_enable_no_resched_notrace();
 
        return time;
 }