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]
Date:	Thu, 14 Jul 2016 20:37:43 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	mingo@...nel.org, linux-kernel@...r.kernel.org
Cc:	oleg@...hat.com, tj@...nel.org, paulmck@...ux.vnet.ibm.com,
	john.stultz@...aro.org, dimitrysh@...gle.com, romlem@...gle.com,
	ccross@...gle.com, tkjos@...gle.com
Subject: Re: [PATCH 2/2] locking/percpu-rwsem: Introduce bias knob

On Thu, Jul 14, 2016 at 08:25:47PM +0200, Peter Zijlstra wrote:
> @@ -19,6 +20,13 @@ int __percpu_init_rwsem(struct percpu_rw
>  
>  	/* ->rw_sem represents the whole percpu_rw_semaphore for lockdep */
>  	rcu_sync_init(&sem->rss, RCU_SCHED_SYNC);
> +	if (bias == PERCPU_RWSEM_WRITER) {
> +		/*
> +		 * Disable rcu_sync() and force slow path.
> +		 */
> +		sem->rss.gp_count++;
> +		sem->rss.gp_state = !0;
> +	}
>  	__init_rwsem(&sem->rw_sem, name, rwsem_key);
>  	init_waitqueue_head(&sem->writer);
>  	sem->state = readers_slow;

So this seemed like a better deal than calling rcu_sync_enter(), because
that would still incur a (pointless) synchronize_sched() at init time
and people do tend to complain about things like that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ