mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
sched, tracing: Stop/start critical timings around the idle=poll idle loop
When using idle=poll, the preemptoff tracer is always showing the idle task as the culprit for long latencies. That happens because critical timings are not stopped before idle loop. This patch stops critical timings before entering the idle loop, starting it again after the idle loop. This problem does not affect the irqsoff tracer because interruptions are enabled before entering the idle loop. Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com> Reviewed-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/10fc3705874aef11dbe152a068b591a7be1899b4.1444314899.git.bristot@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
25cb62b764
commit
9babcd7929
@ -57,9 +57,11 @@ static inline int cpu_idle_poll(void)
|
|||||||
rcu_idle_enter();
|
rcu_idle_enter();
|
||||||
trace_cpu_idle_rcuidle(0, smp_processor_id());
|
trace_cpu_idle_rcuidle(0, smp_processor_id());
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
|
stop_critical_timings();
|
||||||
while (!tif_need_resched() &&
|
while (!tif_need_resched() &&
|
||||||
(cpu_idle_force_poll || tick_check_broadcast_expired()))
|
(cpu_idle_force_poll || tick_check_broadcast_expired()))
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
|
start_critical_timings();
|
||||||
trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
|
trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
|
||||||
rcu_idle_exit();
|
rcu_idle_exit();
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user