public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] rcu: Check for have_rcu_nocb_mask instead of rcu_nocb_mask
@ 2014-07-17 21:30 Pranith Kumar
  2014-07-17 23:49 ` Paul E. McKenney
  0 siblings, 1 reply; 5+ messages in thread
From: Pranith Kumar @ 2014-07-17 21:30 UTC (permalink / raw)
  To: Paul E. McKenney, Josh Triplett, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, open list:READ-COPY UPDATE...

Hi Paul,

This is something similar to what you found yesterday with tick_nohz_full mask.

--
Pranith

If we configure a kernel with CONFIG_NOCB_CPU=y, CONFIG_RCU_NOCB_CPU_NONE=y and
CONFIG_CPUMASK_OFFSTACK=n and do not pass in a rcu_nocb= boot parameter, the
cpumask rcu_nocb_mask can be garbage instead of NULL.

Hence this commit replaces checks for rcu_nocb_mask == NULL with a check for
have_rcu_nocb_mask.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 kernel/rcu/tree_plugin.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index cedb020..15c00b5 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -2542,7 +2542,7 @@ static void __init rcu_organize_nocb_kthreads(struct rcu_state *rsp)
 	struct rcu_data *rdp_leader = NULL;  /* Suppress misguided gcc warn. */
 	struct rcu_data *rdp_prev = NULL;
 
-	if (rcu_nocb_mask == NULL)
+	if (!have_rcu_nocb_mask)
 		return;
 #ifdef CONFIG_NO_HZ_FULL
 	cpumask_or(rcu_nocb_mask, rcu_nocb_mask, tick_nohz_full_mask);
@@ -2575,7 +2575,7 @@ static void __init rcu_organize_nocb_kthreads(struct rcu_state *rsp)
 /* Prevent __call_rcu() from enqueuing callbacks on no-CBs CPUs */
 static bool init_nocb_callback_list(struct rcu_data *rdp)
 {
-	if (rcu_nocb_mask == NULL ||
+	if (have_rcu_nocb_mask == false ||
 	    !cpumask_test_cpu(rdp->cpu, rcu_nocb_mask))
 		return false;
 	rdp->nxttail[RCU_NEXT_TAIL] = NULL;
-- 
1.9.1


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

end of thread, other threads:[~2014-07-19  6:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-17 21:30 [PATCH 1/1] rcu: Check for have_rcu_nocb_mask instead of rcu_nocb_mask Pranith Kumar
2014-07-17 23:49 ` Paul E. McKenney
2014-07-18  0:11   ` Pranith Kumar
2014-07-19  6:10     ` Paul E. McKenney
2014-07-19  6:32       ` Pranith Kumar

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