All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Pranith Kumar <bobby.prani@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org, fabf@skynet.be,
	davidshan@tencent.com, joe@perches.com, keescook@chromium.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [GIT PULL rcu/next] RCU commits for 3.17
Date: Wed, 16 Jul 2014 11:35:39 -0700	[thread overview]
Message-ID: <20140716183539.GC8690@linux.vnet.ibm.com> (raw)
In-Reply-To: <53C6C377.7020900@gmail.com>

On Wed, Jul 16, 2014 at 02:24:55PM -0400, Pranith Kumar wrote:
> On 07/16/2014 02:15 PM, Pranith Kumar wrote:
> >
> > On 07/16/2014 01:24 PM, Paul E. McKenney wrote:
> >>>> And of course if you don't actually specify a nohz_full= mask, then
> >>>> tick_nohz_full_mask can be NULL at RCU initialization time, and if it
> >>>> is also true that CONFIG_NO_HZ_FULL_ALL=n, this condition can persist
> >>>> forever.
> >>>>
> >>> Hi Paul,
> >>>
> >>> The other location where tick_nohz_full_mask is being allocated is in
> >>> tick_nohz_init_all(), called from tick_nohz_init(). rcu_init() is called before
> >>> tick_nohz_init() in init/main.c. CONFIG_NO_HZ_FULL_ALL for allocation of the
> >>> mask does not take effect when rcu_init() runs.
> >>>
> >>> So if nohz_full command line arg is not specified, tick_nohz_full_mask will
> >>> always be NULL when rcu_init() runs. So just checking for tick_nohz_full_mask
> >>> is NULL should be enough I guess.
> >> Yep, that is indeed one of the conditions called out in the commit log
> >> below.
> >>
> >>                             Thanx, Paul
> >>
> >
> > Sorry, I was not clear.
> >
> > nohz_full= boot time parameter overrides the CONFIG_NO_HZ_FULL_ALL build time parameter.
> > The check for !CONFIG_NO_HZ_FULL_ALL will disable masking out the cpus on which NOHZ is
> > not enabled using the nohz_full boot time parameter, and hence you will enable callback
> > offloading on all CPUs as was previously being done.
> >
> > So, if I have CONFIG_NO_HZ_FULL_ALL enabled at build time but pass nohz_cpu=1 at boot
> > time, all the CPUs will have callback offloading enabled.
> >
> > I think the following looks like what is needed in our case:
> >
> 
> The previous patch will fail if CONFIG_NO_HZ_FULL is not defined, this should work.
> 
> Thoughts?

If CONFIG_NO_HZ_FULL_ALL=y, then CONFIG_RCU_NOCB_CPU_ALL=y, in which case
the cpumask_or() is not required because all the bits will already be
set in rcu_nocb_mask.  So no need to change the #if condition.  And
if we were to change it, we would hopefully change it to #ifdef in
this particular case.  ;-)

							Thanx, Paul

> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index 00dc411..83f3f58 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -2479,10 +2479,10 @@ static void __init rcu_spawn_nocb_kthreads(struct rcu_state *rsp)
> 
>         if (rcu_nocb_mask == NULL)
>                 return;
> -#if defined(CONFIG_NO_HZ_FULL) && !defined(CONFIG_NO_HZ_FULL_ALL)
> +#if defined(CONFIG_NO_HZ_FULL)
>         if (tick_nohz_full_running)
>                 cpumask_or(rcu_nocb_mask, rcu_nocb_mask, tick_nohz_full_mask);
> -#endif /* #if defined(CONFIG_NO_HZ_FULL) && !defined(CONFIG_NO_HZ_FULL_ALL) */
> +#endif /* #if defined(CONFIG_NO_HZ_FULL) */
>         if (ls == -1) {
>                 ls = int_sqrt(nr_cpu_ids);
>                 rcu_nocb_leader_stride = ls;
> 
> --
> Pranith
> 
> 
> 
> 
> 


  reply	other threads:[~2014-07-16 18:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-13 18:42 [GIT PULL rcu/next] RCU commits for 3.17 Paul E. McKenney
2014-07-16 11:50 ` Ingo Molnar
2014-07-16 13:13   ` Ingo Molnar
2014-07-16 14:17     ` Paul E. McKenney
2014-07-16 15:26       ` Paul E. McKenney
2014-07-16 15:57         ` Pranith Kumar
2014-07-16 17:24           ` Paul E. McKenney
2014-07-16 18:15             ` Pranith Kumar
2014-07-16 18:24               ` Pranith Kumar
2014-07-16 18:35                 ` Paul E. McKenney [this message]
2014-07-16 18:32               ` Paul E. McKenney
2014-07-16 19:36         ` 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=20140716183539.GC8690@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=bobby.prani@gmail.com \
    --cc=davidshan@tencent.com \
    --cc=fabf@skynet.be \
    --cc=joe@perches.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.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.