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: <20160602142619.nha6gcs5x4nmwyu3@linux-uzut.site>
Date:	Thu, 2 Jun 2016 07:26:20 -0700
From:	Davidlohr Bueso <dave@...olabs.net>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Ingo Molnar <mingo@...nel.org>, Waiman Long <Waiman.Long@....com>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>,
	viro@...IV.linux.org.uk, linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] mutex: Optimize mutex_trylock() fast-path

On Wed, 01 Jun 2016, Peter Zijlstra wrote:

>
>A while back Viro posted a number of 'interesting' mutex_is_locked()
>users on IRC, one of those was RCU.
>
>RCU seems to use mutex_is_locked() to avoid doing mutex_trylock(), the
>regular load before modify pattern.
>
>While the use isn't wrong per se, its curious in that its needed at all,
>mutex_trylock() should be good enough on its own to avoid the pointless
>cacheline bounces.

Yeah, and we use ccas just about everywhere else for mutexes.

>
>So fix those and remove the mutex_is_locked() (ab)use from RCU.
>
>Reported-by: Al Viro <viro@...IV.linux.org.uk>
>Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>

Acked-by: Davidlohr Bueso <dave@...olabs.net>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ