From: tip-bot for Daniel Bristot de Oliveira <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: bristot@redhat.com, efault@gmx.de, hpa@zytor.com,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
rostedt@goodmis.org, torvalds@linux-foundation.org,
peterz@infradead.org, mingo@kernel.org, lgoncalv@redhat.com
Subject: [tip:sched/urgent] sched, tracing: Stop/ start critical timings around the idle=poll idle loop
Date: Mon, 12 Oct 2015 00:54:32 -0700 [thread overview]
Message-ID: <tip-9babcd7929bc8967ae3bb6093f603b93c2f9958f@git.kernel.org> (raw)
In-Reply-To: <10fc3705874aef11dbe152a068b591a7be1899b4.1444314899.git.bristot@redhat.com>
Commit-ID: 9babcd7929bc8967ae3bb6093f603b93c2f9958f
Gitweb: http://git.kernel.org/tip/9babcd7929bc8967ae3bb6093f603b93c2f9958f
Author: Daniel Bristot de Oliveira <bristot@redhat.com>
AuthorDate: Thu, 8 Oct 2015 15:36:06 -0300
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 12 Oct 2015 09:45:25 +0200
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>
---
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;
prev parent reply other threads:[~2015-10-12 7:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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-bot for Daniel Bristot de Oliveira [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-9babcd7929bc8967ae3bb6093f603b93c2f9958f@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bristot@redhat.com \
--cc=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=lgoncalv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox