public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] trace: stop critical timings before idle loop on idle=poll
@ 2015-10-08 18:36 Daniel Bristot de Oliveira
  2015-10-09 16:38 ` Steven Rostedt
  2015-10-12  7:54 ` [tip:sched/urgent] sched, tracing: Stop/ start critical timings around the idle=poll idle loop tip-bot for Daniel Bristot de Oliveira
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Bristot de Oliveira @ 2015-10-08 18:36 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Steven Rostedt
  Cc: LKML, Luis Claudio R. Goncalves

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>
---
 kernel/sched/idle.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index 8f177c7..4a2ef5a 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -57,9 +57,11 @@ static inline int cpu_idle_poll(void)
 	rcu_idle_enter();
 	trace_cpu_idle_rcuidle(0, smp_processor_id());
 	local_irq_enable();
+	stop_critical_timings();
 	while (!tif_need_resched() &&
 		(cpu_idle_force_poll || tick_check_broadcast_expired()))
 		cpu_relax();
+	start_critical_timings();
 	trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
 	rcu_idle_exit();
 	return 1;
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-12  7:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-08 18:36 [PATCH] trace: stop critical timings before idle loop on idle=poll Daniel Bristot de Oliveira
2015-10-09 16:38 ` Steven Rostedt
2015-10-12  7:54 ` [tip:sched/urgent] sched, tracing: Stop/ start critical timings around the idle=poll idle loop tip-bot for Daniel Bristot de Oliveira

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox