From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Pranith Kumar <bobby.prani@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
"open list:READ-COPY UPDATE..." <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] rcu: Check for have_rcu_nocb_mask instead of rcu_nocb_mask
Date: Thu, 17 Jul 2014 16:49:20 -0700 [thread overview]
Message-ID: <20140717234920.GD8690@linux.vnet.ibm.com> (raw)
In-Reply-To: <1405632611-29872-1-git-send-email-bobby.prani@gmail.com>
On Thu, Jul 17, 2014 at 05:30:11PM -0400, Pranith Kumar wrote:
> 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>
Good catch! Could you please forward-port this to current rcu/dev?
This now includes the fix you mentioned above, which generates conflicts.
Could you please also fix the use in rcu_is_nocb_cpu()?
And please see the comment below.
Thanx, Paul
> ---
> 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 ||
This should really be "if (!have_rcu_nocb_mask".
Of course, the original should have been "if (!rcu_nocb_mask", but old
habits die hard. ;-)
> !cpumask_test_cpu(rdp->cpu, rcu_nocb_mask))
> return false;
> rdp->nxttail[RCU_NEXT_TAIL] = NULL;
> --
> 1.9.1
>
next prev parent reply other threads:[~2014-07-17 23:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2014-07-18 0:11 ` Pranith Kumar
2014-07-19 6:10 ` Paul E. McKenney
2014-07-19 6:32 ` Pranith Kumar
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=20140717234920.GD8690@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=bobby.prani@gmail.com \
--cc=josh@joshtriplett.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rostedt@goodmis.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