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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z79aeJn_bC9ptBD4@pc636>
Date: Wed, 26 Feb 2025 19:16:24 +0100
From: Uladzislau Rezki <urezki@...il.com>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: Joel Fernandes <joelagnelf@...dia.com>,
	Uladzislau Rezki <urezki@...il.com>,
	Boqun Feng <boqun.feng@...il.com>, RCU <rcu@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <frederic@...nel.org>,
	Cheung Wall <zzqq0103.hey@...il.com>,
	Neeraj upadhyay <Neeraj.Upadhyay@....com>,
	Joel Fernandes <joel@...lfernandes.org>,
	Oleksiy Avramchenko <oleksiy.avramchenko@...y.com>
Subject: Re: [PATCH v3 1/3] rcutorture: Allow a negative value for
 nfakewriters

On Wed, Feb 26, 2025 at 10:04:35AM -0800, Paul E. McKenney wrote:
> On Wed, Feb 26, 2025 at 12:49:41PM -0500, Joel Fernandes wrote:
> > 
> > 
> > On 2/26/2025 9:29 AM, Uladzislau Rezki wrote:
> > > On Tue, Feb 25, 2025 at 04:24:09PM -0500, Joel Fernandes wrote:
> > >> On Tue, Feb 25, 2025 at 12:00:18PM +0100, Uladzislau Rezki (Sony) wrote:
> > >>> Currently "nfakewriters" parameter can be set to any value but
> > >>> there is no possibility to adjust it automatically based on how
> > >>> many CPUs a system has where a test is run on.
> > >>>
> > >>> To address this, if the "nfakewriters" is set to negative it will
> > >>> be adjusted to num_online_cpus() during torture initialization.
> > >>>
> > >>> Reviewed-by: Paul E. McKenney <paulmck@...nel.org>
> > >>> Signed-off-by: Uladzislau Rezki (Sony) <urezki@...il.com>
> > >>> ---
> > >>>  kernel/rcu/rcutorture.c | 22 ++++++++++++++++------
> > >>>  1 file changed, 16 insertions(+), 6 deletions(-)
> > >>>
> > >>> diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
> > >>> index d98b3bd6d91f..f376262532ce 100644
> > >>> --- a/kernel/rcu/rcutorture.c
> > >>> +++ b/kernel/rcu/rcutorture.c
> > >>> @@ -148,6 +148,7 @@ MODULE_PARM_DESC(torture_type, "Type of RCU to torture (rcu, srcu, ...)");
> > >>
> > >> IMO, this should also be updated to reflect the possibily to set it negative
> > >> and hence to number CPUs:
> > >>
> > >> torture_param(int, nfakewriters, 4, "Number of RCU fake writer threads");
> > >>
> > > You can set it to a negative as well as to number of CPUs or any other
> > > number.
> > Sorry I just meant amend the description to something like "Number of RCU fake
> > writer threads (or set to -1 for NR_CPUs)", so user does not have to read code
> > to know that (and update the kernel cmdline params document as well).
> 
> Should we also adjust the string for nreaders?
> 
Makes sense. Both options are adjusted in same way.

--
Uladzislau Rezki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ