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] [day] [month] [year] [list]
Date:	Fri, 22 Jul 2016 22:53:13 +0300
From:	Imre Deak <imre.deak@...el.com>
To:	Davidlohr Bueso <dave@...olabs.net>
Cc:	Waiman Long <waiman.long@....com>, Jason Low <jason.low2@....com>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	Chris Wilson <chris@...is-wilson.co.uk>,
	Daniel Vetter <daniel.vetter@...el.com>
Subject: Re: [RFC] Avoid mutex starvation when optimistic spinning is
 disabled

On Fri, 2016-07-22 at 12:26 -0700, Davidlohr Bueso wrote:
> On Fri, 22 Jul 2016, Imre Deak wrote:
> 
> > On Fri, 2016-07-22 at 11:03 -0700, Davidlohr Bueso wrote:
> > > On Fri, 22 Jul 2016, Waiman Long wrote:
> > > 
> > > > I think making mutex_trylock() fail maybe a bit too far. Do we
> > > > really
> > > > have any real workload that cause starvation problem  because
> > > > of
> > > > that.
> > > > Code that does mutex_trylock() in a loop can certainly cause
> > > > lock
> > > > starvation, but it is not how mutex_trylock() is supposed to be
> > > > used.
> > > > We can't build in safeguard for all the possible abuses of the
> > > > mutex
> > > > APIs.
> > > 
> > > True, and that's actually why I think that 'fixing' the
> > > !SPIN_ON_OWNER case
> > > is a bit too far in the first place: most of the archs that will
> > > care
> > > about
> > > this already have ARCH_SUPPORTS_ATOMIC_RMW. The extra code for
> > > dealing with
> > > this is not worth it imo.
> > 
> > SPIN_ON_OWNER is also disabled in case of DEBUG_MUTEXES, which is
> > the
> > config where I wanted to avoid starvation in the first place.
> 
> Well yes, but know of course that that option is even less common
> than
> archs with non atomic Rmw.

The point is that it's broken atm.

--Imre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ