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, 29 Jan 2015 12:13:21 -0800
From:	Jason Low <jason.low2@...com>
To:	Davidlohr Bueso <dave@...olabs.net>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Michel Lespinasse <walken@...gle.com>,
	Tim Chen <tim.c.chen@...ux.intel.com>,
	linux-kernel@...r.kernel.org, jason.low2@...com
Subject: Re: [PATCH 4/6] locking/rwsem: Avoid deceiving lock spinners

On Wed, 2015-01-28 at 17:10 -0800, Davidlohr Bueso wrote:

> 	if (READ_ONCE(sem->owner))
> 		return true; /* new owner, continue spinning */

In terms of the sem->owner check, I agree. This also reminds me of a
similar patch I was going to send out, but for mutex. The idea is that
before we added all the MCS logic, we wanted to return false if owner
isn't NULL to prevent too many threads simultaneously spinning on the
owner at the same time.

With the new MCS queuing, we don't have to worry about that issue, so it
makes sense to continue spinning as long as owner is running and the
spinner doesn't need to reschedule.


--
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