public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Low <jason.low2@hp.com>
To: Davidlohr Bueso <davidlohr@hp.com>
Cc: mingo@kernel.org, peterz@infradead.org, tglx@linutronix.de,
	akpm@linux-foundation.org, tim.c.chen@linux.intel.com,
	paulmck@linux.vnet.ibm.com, hpa@zytor.com, waiman.long@hp.com,
	aswin@hp.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mutex: Documentation rewrite
Date: Wed, 21 May 2014 14:16:49 -0700	[thread overview]
Message-ID: <1400707009.4661.23.camel@j-VirtualBox> (raw)
In-Reply-To: <1400694115.2646.4.camel@buesod1.americas.hpqcorp.net>

On Wed, 2014-05-21 at 10:41 -0700, Davidlohr Bueso wrote:
> From: Davidlohr Bueso <davidlohr@hp.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.



  parent reply	other threads:[~2014-05-21 21:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-21 17:41 [RFC PATCH] mutex: Documentation rewrite Davidlohr Bueso
2014-05-21 19:02 ` Tim Chen
2014-05-21 19:52   ` Davidlohr Bueso
2014-05-21 21:16 ` Jason Low [this message]
2014-05-21 22:42   ` Davidlohr Bueso
2014-05-22 16:41 ` [PATCH v2] " Davidlohr Bueso
2014-05-22 17:09   ` Randy Dunlap
2014-05-23 15:16 ` [PATCH v3] " Davidlohr Bueso
2014-05-27 16:03   ` Waiman Long
2014-05-27 17:33     ` Jason Low
2014-05-29  4:36 ` [PATCH v4] " Davidlohr Bueso
2014-06-05 14:40   ` [tip:locking/core] locking/mutexes: Documentation update/rewrite tip-bot for Davidlohr Bueso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400707009.4661.23.camel@j-VirtualBox \
    --to=jason.low2@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=aswin@hp.com \
    --cc=davidlohr@hp.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tim.c.chen@linux.intel.com \
    --cc=waiman.long@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox