linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip: core/rcu] rcu: Ensure that ->rcu_urgent_qs is set before resched IPI
@ 2019-10-31 11:54 tip-bot2 for Joel Fernandes (Google)
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Joel Fernandes (Google) @ 2019-10-31 11:54 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Joel Fernandes (Google),
	Paul E. McKenney, Ingo Molnar, Borislav Petkov, linux-kernel

The following commit has been merged into the core/rcu branch of tip:

Commit-ID:     05ef9e9eb3dade21413680f41eb0170778e8ae2b
Gitweb:        https://git.kernel.org/tip/05ef9e9eb3dade21413680f41eb0170778e8ae2b
Author:        Joel Fernandes (Google) <joel@joelfernandes.org>
AuthorDate:    Thu, 15 Aug 2019 22:59:14 -04:00
Committer:     Paul E. McKenney <paulmck@kernel.org>
CommitterDate: Wed, 30 Oct 2019 08:34:35 -07:00

rcu: Ensure that ->rcu_urgent_qs is set before resched IPI

The RCU-specific resched_cpu() function sends a resched IPI to the
specified CPU, which can be used to force the tick on for a given
nohz_full CPU.  This is needed when this nohz_full CPU is looping in the
kernel while blocking the current grace period.  However, for the tick
to actually be forced on in all cases, that CPU's rcu_data structure's
->rcu_urgent_qs flag must be set beforehand.  This commit therefore
causes rcu_implicit_dynticks_qs() to set this flag prior to invoking
resched_cpu() on a holdout nohz_full CPU.

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 kernel/rcu/tree.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 8110514..0d83b19 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1073,6 +1073,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
 	if (tick_nohz_full_cpu(rdp->cpu) &&
 		   time_after(jiffies,
 			      READ_ONCE(rdp->last_fqs_resched) + jtsq * 3)) {
+		WRITE_ONCE(*ruqp, true);
 		resched_cpu(rdp->cpu);
 		WRITE_ONCE(rdp->last_fqs_resched, jiffies);
 	}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-31 11:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-31 11:54 [tip: core/rcu] rcu: Ensure that ->rcu_urgent_qs is set before resched IPI tip-bot2 for Joel Fernandes (Google)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).