8000 sched, tracing: Stop/start critical timings around the idle=poll idle… · bsd-unix/linux@9babcd7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9babcd7

Browse files
Daniel Bristot de OliveiraIngo Molnar
authored andcommitted
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>
1 parent 25cb62b commit 9babcd7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/sched/idle.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ static inline int cpu_idle_poll(void)
5757
rcu_idle_enter();
5858
trace_cpu_idle_rcuidle(0, smp_processor_id());
5959
local_irq_enable();
60+
stop_critical_timings();
6061
while (!tif_need_resched() &&
6162
(cpu_idle_force_poll || tick_check_broadcast_expired()))
6263
cpu_relax();
64+
start_critical_timings();
6365
trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
6466
rcu_idle_exit();
6567
return 1;

0 commit comments

Comments
 (0)
0