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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150513010313.GF14292@cloud>
Date:	Tue, 12 May 2015 18:03:13 -0700
From:	josh@...htriplett.org
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...nel.org,
	laijs@...fujitsu.com, dipankar@...ibm.com,
	akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
	tglx@...utronix.de, peterz@...radead.org, rostedt@...dmis.org,
	dhowells@...hat.com, edumazet@...gle.com, dvhart@...ux.intel.com,
	fweisbec@...il.com, oleg@...hat.com, bobby.prani@...il.com
Subject: Re: [PATCH tip/core/rcu 04/13] rcutorture: Allow negative values
 of nreaders to oversubscribe

On Tue, May 12, 2015 at 03:58:04PM -0700, Paul E. McKenney wrote:
> From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
> 
> By default, with rcutorture.nreaders equal to -1, rcutorture provisions
> N-1 reader kthreads, where N is the number of CPUs.  This avoids
> rcutorture-induced stalls, but also avoids heavier levels of torture.
> This commit therefore allows negative values of rcutorture.nreaders
> to specify larger numbers of reader kthreads, so that for example
> rcutorture.nreaders=-2 provisions N kthreads and rcutorture.nreaders=-5
> provisions N+3 kthreads.
> 
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>

That seems rather excessively arcane.  Then again, I guess we started
down the road to arcana when we allowed -1 to mean N-1.

However, could you please document this in the module parameter
documentation?

>  kernel/rcu/rcutorture.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
> index a67ef6ff86b0..7294d605c481 100644
> --- a/kernel/rcu/rcutorture.c
> +++ b/kernel/rcu/rcutorture.c
> @@ -1701,7 +1701,7 @@ rcu_torture_init(void)
>  	if (nreaders >= 0) {
>  		nrealreaders = nreaders;
>  	} else {
> -		nrealreaders = num_online_cpus() - 1;
> +		nrealreaders = num_online_cpus() - 2 - nreaders;
>  		if (nrealreaders <= 0)
>  			nrealreaders = 1;
>  	}
> -- 
> 1.8.1.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ