lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 17 Nov 2021 14:33:13 -0800
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Frederic Weisbecker <frederic@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Uladzislau Rezki <urezki@...il.com>,
        Neeraj Upadhyay <quic_neeraju@...cinc.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Josh Triplett <josh@...htriplett.org>,
        Joel Fernandes <joel@...lfernandes.org>, rcu@...r.kernel.org
Subject: Re: [PATCH 5/6] rcu/nocb: Allow empty "rcu_nocbs" kernel parameter

On Wed, Nov 17, 2021 at 11:02:30PM +0100, Frederic Weisbecker wrote:
> On Wed, Nov 17, 2021 at 11:46:05AM -0800, Paul E. McKenney wrote:
> > On Wed, Nov 17, 2021 at 04:56:36PM +0100, Frederic Weisbecker wrote:
> > > If a user wants to boot without any CPU in offloaded mode initially but
> > > with the possibility to offload them later using cpusets, provide a way
> > > to simply pass an empty "rcu_nocbs" kernel parameter which will enforce
> > > the creation of dormant nocb kthreads.
> > > 
> > > Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
> > > Cc: Neeraj Upadhyay <quic_neeraju@...cinc.com>
> > > Cc: Boqun Feng <boqun.feng@...il.com>
> > > Cc: Uladzislau Rezki <urezki@...il.com>
> > > Cc: Josh Triplett <josh@...htriplett.org>
> > > Cc: Joel Fernandes <joel@...lfernandes.org>
> > > ---
> > >  kernel/rcu/tree_nocb.h | 10 ++++++----
> > 
> > Could you please also update kernel-parameters.txt?
> 
> Ah right!
> 
> > 
> > >  1 file changed, 6 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h
> > > index 1871f15b8472..3845f1885ffc 100644
> > > --- a/kernel/rcu/tree_nocb.h
> > > +++ b/kernel/rcu/tree_nocb.h
> > > @@ -66,14 +66,16 @@ static bool rcu_nocb_is_setup;
> > >  static int __init rcu_nocb_setup(char *str)
> > >  {
> > >  	alloc_bootmem_cpumask_var(&rcu_nocb_mask);
> > > -	if (cpulist_parse(str, rcu_nocb_mask)) {
> > > -		pr_warn("rcu_nocbs= bad CPU range, all CPUs set\n");
> > > -		cpumask_setall(rcu_nocb_mask);
> > > +	if (*str == '=') {
> > > +		if (cpulist_parse(++str, rcu_nocb_mask)) {
> > > +			pr_warn("rcu_nocbs= bad CPU range, all CPUs set\n");
> > > +			cpumask_setall(rcu_nocb_mask);
> > > +		}
> > 
> > Wouldn't "*str == '='" indicate that the parameter passed in was of
> > the form "rcu_nocbs==8"?
> > 
> > Or am I misreading the next_arg() function in lib/cmdline.c?
> > 
> > If I am reading it correctly, doesn't the test instead want to be
> > something of the form "if (str && *str)"?
> > 
> > 							Thanx, Paul
> > 
> > >  	}
> > >  	rcu_nocb_is_setup = true;
> > >  	return 1;
> > >  }
> > > -__setup("rcu_nocbs=", rcu_nocb_setup);
> > > +__setup("rcu_nocbs", rcu_nocb_setup);
> 
> Don't miss that line, that should probably answer your above question, if
> I didn't miss something from my end (which is not unlikely...)

My next step would be to add a printk() and try booting with different
rcu_nocbs parameter settings.  ;-)

							Thanx, Paul

> > >  static int __init parse_rcu_nocb_poll(char *arg)
> > >  {
> > > -- 
> > > 2.25.1
> > > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ