From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH 03/10] rcu: Kick full dynticks CPU on extended grace period with a void IRQ
Date: Mon, 21 Jul 2014 11:16:12 -0700 [thread overview]
Message-ID: <20140721181612.GJ8690@linux.vnet.ibm.com> (raw)
In-Reply-To: <1405730661-9355-4-git-send-email-fweisbec@gmail.com>
On Sat, Jul 19, 2014 at 02:44:14AM +0200, Frederic Weisbecker wrote:
> When a full dynticks CPU stays for too long in the kernel, it may fail
> to report quiescent states due to it missing ticks and therefore it can
> delay the completion of grace periods.
>
> A way to solve this is to send an IPI to the incriminated CPU such that
> it can check rcu_needs_cpu() and reschedule some ticks accordingly to
> poll again on quiescent states reports.
>
> This is what we try to achieve while calling rcu_kick_nohz_cpu() but it
> has no effect because we trigger a scheduler IPI which is actually a
> no-op when not used for scheduler internal purpose, ie: it doesn't call
> irq_exit() when not used for remote wakeup or other specifics.
>
> No need to tweak the scheduler IPI further though. Lets keep it clean
> of external noise and use an empty IPI instead. We hereby get sure that
> we will call irq_exit() on the target without much overhead nor added
> noise on scheduler fast path.
>
> Cc: Ingo Molnar <mingo@kernel.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>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> ---
> kernel/rcu/tree_plugin.h | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index cbc2c45..395c14d 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -2401,14 +2401,16 @@ static bool init_nocb_callback_list(struct rcu_data *rdp)
> * off. RCU will be paying attention to this CPU because it is in the
> * kernel, but the CPU cannot be guaranteed to be executing the RCU state
> * machine because the scheduling-clock tick has been disabled. Therefore,
> - * if an adaptive-ticks CPU is failing to respond to the current grace
> - * period and has not be idle from an RCU perspective, kick it.
> + * if an full dynticks CPU is failing to respond to the current grace
> + * period and has not be idle from an RCU perspective, kick it with a
> + * void IRQ so that it can check that RCU needs its tick from rcu_needs_cpu()
> + * on irq exit.
> */
> static void rcu_kick_nohz_cpu(int cpu)
> {
> #ifdef CONFIG_NO_HZ_FULL
> if (tick_nohz_full_cpu(cpu))
> - smp_send_reschedule(cpu);
> + irq_work_void_on(cpu);
> #endif /* #ifdef CONFIG_NO_HZ_FULL */
> }
>
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
next prev parent reply other threads:[~2014-07-21 18:16 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-19 0:44 [RFC PATCH 00/10] nohz: Support sysidle (and some more cleanups) Frederic Weisbecker
2014-07-19 0:44 ` [PATCH 01/10] irq_work: Introduce void irq work Frederic Weisbecker
2014-07-21 18:16 ` Paul E. McKenney
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
2014-07-19 0:44 ` [PATCH 03/10] rcu: Kick full dynticks CPU on extended grace period with a void IRQ Frederic Weisbecker
2014-07-21 18:16 ` Paul E. McKenney [this message]
2014-07-19 0:44 ` [PATCH 04/10] nohz: Appropriate timekeeper kick on sysidle break Frederic Weisbecker
2014-07-21 18:15 ` Paul E. McKenney
2014-07-19 0:44 ` [PATCH 05/10] smp: Fast path check on IPI list Frederic Weisbecker
2014-07-19 0:44 ` [PATCH 06/10] nohz: Define meaningful symbol for nohz full timekeeper Frederic Weisbecker
2014-07-21 18:11 ` Paul E. McKenney
2014-07-21 18:12 ` Paul E. McKenney
2014-07-25 21:27 ` Frederic Weisbecker
2014-07-19 0:44 ` [PATCH 07/10] nohz: Enforce timekeeping on CPU 0 Frederic Weisbecker
2014-07-19 17:31 ` Nicolas Pitre
2014-07-19 18:31 ` Peter Zijlstra
2014-07-19 18:46 ` Nicolas Pitre
2014-07-19 19:45 ` Peter Zijlstra
2014-07-20 1:07 ` Frederic Weisbecker
2014-07-19 0:44 ` [PATCH 08/10] nohz: Fetch timekeeping max deferment only for timekeeper Frederic Weisbecker
2014-07-19 0:44 ` [PATCH 09/10] nohz: Switch nohz full timekeeper to dynticks idle on top of sysidle detection Frederic Weisbecker
2014-07-21 17:50 ` Paul E. McKenney
2014-07-19 0:44 ` [PATCH 10/10] nohz: Warn on illegal timekeeper switch in nohz full Frederic Weisbecker
2014-07-21 17:51 ` Paul E. McKenney
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=20140721181612.GJ8690@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.