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: <20140507212015.GB27924@cloud>
Date:	Wed, 7 May 2014 14:20:15 -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,
	niv@...ibm.com, tglx@...utronix.de, peterz@...radead.org,
	rostedt@...dmis.org, dhowells@...hat.com, edumazet@...gle.com,
	darren@...art.com, fweisbec@...il.com, oleg@...hat.com, sbw@....edu
Subject: Re: [PATCH tip/core/rcu 06/45] torture: Intensify locking test

On Mon, Apr 28, 2014 at 05:24:54PM -0700, Paul E. McKenney wrote:
> From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
> 
> The current lock_torture_writer() spends too much time sleeping and not
> enough time hammering locks, as in an eight-CPU test will often only be
> utilizing a CPU or two.  This commit therefore makes lock_torture_writer()
> sleep less and hammer more.
> 
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> ---
>  kernel/locking/locktorture.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
> index f26b1a18e34e..b0d3e3c50672 100644
> --- a/kernel/locking/locktorture.c
> +++ b/kernel/locking/locktorture.c
> @@ -219,7 +219,8 @@ static int lock_torture_writer(void *arg)
>  	set_user_nice(current, 19);
>  
>  	do {
> -		schedule_timeout_uninterruptible(1);
> +		if ((torture_random(&rand) & 0xfffff) == 0)
> +			schedule_timeout_uninterruptible(1);

That's a one-in-1048576 chance of sleeping for a jiffy; is that frequent
enough to even bother sleeping at all?

>  		cur_ops->writelock();
>  		if (WARN_ON_ONCE(lock_is_write_held))
>  			lwsp->n_write_lock_fail++;
> -- 
> 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