mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Matthias Bonne <lemonlime51@gmail.com>
Cc: Yann Droneaud <ydroneaud@opteya.com>,
	kernelnewbies@kernelnewbies.org, linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: Question on mutex code
Date: Sat, 14 Mar 2015 18:09:06 -0700	[thread overview]
Message-ID: <1426381746.28068.70.camel@stgolabs.net> (raw)
In-Reply-To: <1426381401.28068.68.camel@stgolabs.net>

On Sat, 2015-03-14 at 18:03 -0700, Davidlohr Bueso wrote:
> Good analysis, but not quite accurate for one simple fact: mutex
> trylocks _only_ use fastpaths (obviously just depend on the counter
> cmpxchg to 0), so you never fallback to the slowpath you are mentioning,
> thus the race is non existent. Please see the arch code.

For debug we use the trylock slowpath, but so does everything else, so
again you cannot hit this scenario.


  reply	other threads:[~2015-03-15  1:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <54F64E10.7050801@gmail.com>
2015-03-10 13:03 ` Yann Droneaud
2015-03-10 14:59   ` Valdis.Kletnieks
2015-03-14 23:08     ` Matthias Bonne
2015-03-14 23:05   ` Matthias Bonne
2015-03-15  1:03     ` Davidlohr Bueso
2015-03-15  1:09       ` Davidlohr Bueso [this message]
2015-03-15 21:49         ` Matthias Bonne
2015-03-15 22:10           ` Rabin Vincent
2015-03-16  3:40             ` Matthias Bonne
2015-03-15 22:18           ` Davidlohr Bueso
2015-03-15 22:23             ` 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=1426381746.28068.70.camel@stgolabs.net \
    --to=dave@stgolabs.net \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=lemonlime51@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=ydroneaud@opteya.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

all inboxes | Powered by JetHome®