From: Frederic Weisbecker <fweisbec@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@kernel.org>,
Nicolas Pitre <nicolas.pitre@linaro.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: [PATCH 02/10] nohz: Kick full dynticks timer targets with an empty IPI
Date: Mon, 28 Jul 2014 19:37:28 +0200 [thread overview]
Message-ID: <1406569056-30217-3-git-send-email-fweisbec@gmail.com> (raw)
In-Reply-To: <1406569056-30217-1-git-send-email-fweisbec@gmail.com>
While we enqueue a new timer on a dynticks target, we must send it an
IPI so that it reschedules the next tick accordingly.
Now all we need for that is to run irq_exit() on the target. Hence
an empty IRQ is way enough. We don't need to run tick_nohz_full_check()
and all the overhead that comes with the several cmpxchg() necessary for
irq work list and state progress.
So lets use a void irq work instead.
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
kernel/sched/core.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 7f3063c..171f9ce 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -685,15 +685,13 @@ static void wake_up_idle_cpu(int cpu)
static bool wake_up_full_nohz_cpu(int cpu)
{
/*
- * We just need the target to call irq_exit() and re-evaluate
- * the next tick. The nohz full kick at least implies that.
- * If needed we can still optimize that later with an
- * empty IRQ.
+ * Kick the target to make it call irq_exit() and re-evaluate
+ * the next tick.
*/
if (tick_nohz_full_cpu(cpu)) {
if (cpu != smp_processor_id() ||
tick_nohz_tick_stopped())
- tick_nohz_full_kick_cpu(cpu);
+ kick_cpu_async(cpu);
return true;
}
--
1.8.3.1
next prev parent reply other threads:[~2014-07-28 17:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 17:37 [PATCH 00/10] nohz: Support sysidle (+ some more nohz kick cleanups) Frederic Weisbecker
2014-07-28 17:37 ` [PATCH 01/10] smp: Introduce void kick_cpu_async() Frederic Weisbecker
2014-07-28 17:37 ` Frederic Weisbecker [this message]
2014-07-29 11:33 ` [PATCH 02/10] nohz: Kick full dynticks timer targets with an empty IPI Peter Zijlstra
2014-07-29 21:53 ` Frederic Weisbecker
2014-07-28 17:37 ` [PATCH 03/10] rcu: Kick full dynticks CPU on extended grace period with kick_cpu_async() Frederic Weisbecker
2014-07-28 17:37 ` [PATCH 04/10] nohz: Appropriate timekeeper kick on sysidle break Frederic Weisbecker
2014-07-28 17:37 ` [PATCH 05/10] smp: Fast path check on IPI list Frederic Weisbecker
2014-07-29 12:07 ` Peter Zijlstra
2014-07-29 21:54 ` Frederic Weisbecker
2014-07-29 21:55 ` Frederic Weisbecker
2014-07-28 17:37 ` [PATCH 06/10] nohz: Define meaningful symbol for nohz full timekeeper Frederic Weisbecker
2014-07-28 17:37 ` [PATCH 07/10] nohz: Enforce timekeeping on CPU 0 Frederic Weisbecker
2014-07-29 12:12 ` Peter Zijlstra
2014-07-30 13:23 ` Frederic Weisbecker
2014-07-28 17:37 ` [PATCH 08/10] nohz: Fetch timekeeping max deferment only for timekeeper Frederic Weisbecker
2014-07-28 17:37 ` [PATCH 09/10] nohz: Switch nohz full timekeeper to dynticks idle on top of sysidle detection Frederic Weisbecker
2014-07-29 12:17 ` Peter Zijlstra
2014-07-29 22:04 ` Frederic Weisbecker
2014-07-28 17:37 ` [PATCH 10/10] nohz: Warn on illegal timekeeper switch in nohz full Frederic Weisbecker
-- strict thread matches above, loose matches on Subject: below --
2014-07-19 0:44 [RFC PATCH 00/10] nohz: Support sysidle (and some more cleanups) Frederic Weisbecker
2014-07-19 0:44 ` [PATCH 02/10] nohz: Kick full dynticks timer targets with an empty IPI Frederic Weisbecker
2014-07-19 7:19 ` Peter Zijlstra
2014-07-19 13:18 ` Frederic Weisbecker
2014-07-19 13:47 ` Peter Zijlstra
2014-07-19 13:54 ` Frederic Weisbecker
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=1406569056-30217-3-git-send-email-fweisbec@gmail.com \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=nicolas.pitre@linaro.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=viresh.kumar@linaro.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
all inboxes | Powered by JetHome®