sched/idle: Move latency tracing stop/start calls deeper inside the idle loop
authorLucas Stach <l.stach@pengutronix.de>
Mon, 20 Jul 2015 16:34:50 +0000 (18:34 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 21 Jul 2015 06:18:51 +0000 (08:18 +0200)
commit63caae8480921773b46adec0b6ddac9a844a042f
treef1bfb0d5537fc05a021aeb17532775b17f7cdb1f
parent399595f248cb25dccb6044b53c47c44c174dc23d
sched/idle: Move latency tracing stop/start calls deeper inside the idle loop

Make sure to stop tracing only once we are past a point where
all latency tracing events have been processed (irqs are not
enabled again). This has the slight advantage of capturing more
latency related events in the idle path, but most importantly it
makes sure that latency tracing doesn't get re-enabled
inadvertently when new events are coming in.

This makes the irqsoff latency tracer useful again, as we stop
capturing CPU sleep time as IRQ latency.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: kernel@pengutronix.de
Cc: patchwork-lst@pengutronix.de
Link: http://lkml.kernel.org/r/1437410090-3747-1-git-send-email-l.stach@pengutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/cpuidle/cpuidle.c
kernel/sched/idle.c