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  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:	Wed, 21 May 2014 15:42:07 -0700
From:	Davidlohr Bueso <davidlohr@...com>
To:	Jason Low <jason.low2@...com>
Cc:	mingo@...nel.org, peterz@...radead.org, tglx@...utronix.de,
	akpm@...ux-foundation.org, tim.c.chen@...ux.intel.com,
	paulmck@...ux.vnet.ibm.com, hpa@...or.com, waiman.long@...com,
	aswin@...com, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] mutex: Documentation rewrite

On Wed, 2014-05-21 at 14:16 -0700, Jason Low wrote:
> On Wed, 2014-05-21 at 10:41 -0700, Davidlohr Bueso wrote:
> > From: Davidlohr Bueso <davidlohr@...com>
> 
> > +     The MCS lock (proposed by Mellor-Crummey and Scott) is a simple spinlock
> > +     with the desirable properties of being fair and with each cpu trying
> > +     to acquire the lock spinning on a local variable. It avoids expensive
> > +     cacheline bouncing that common test-and-set spinlock implementations
> > +     incur. An MCS-like lock is specially tailored for optimistic spinning
> > +     for sleeping lock implementation.
> 
> Would it be helpful to also briefly mention the benefit of using the
> specially tailored MCS lock? Maybe something along the lines of: an
> important feature of the customized MCS lock is that it has the extra
> property that spinners are able to exit the MCS spinlock queue when they
> needs to reschedule. This further helps avoid situations where MCS
> spinners that need to reschedule would continue waiting to spin on mutex
> owner, only to go directly to slowpath upon obtaining the MCS lock.

Good idea, will add it. I didn't want to go into too much details about
MCS locks but it is worth mentioning the cancelable properties we now
have in the kernel.

Thanks,
Davidlohr


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