From: Davidlohr Bueso <dave@stgolabs.net>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Oleg Nesterov <oleg@redhat.com>,
Paul McKenney <paulmck@linux.vnet.ibm.com>,
Ingo Molnar <mingo@kernel.org>,
mtk.manpages@gmail.com, dvhart@infradead.org,
Vineet.Gupta1@synopsys.com, ralf@linux-mips.org,
ddaney@caviumnetworks.com, Will Deacon <will.deacon@arm.com>,
linux-kernel@vger.kernel.org
Subject: Re: futex atomic vs ordering constraints
Date: Fri, 28 Aug 2015 18:33:06 -0700 [thread overview]
Message-ID: <1440811986.1831.9.camel@stgolabs.net> (raw)
In-Reply-To: <20150826181659.GW16853@twins.programming.kicks-ass.net>
On Wed, 2015-08-26 at 20:16 +0200, Peter Zijlstra wrote:
> Of course, if anything else prior to futex_atomic_op_inuser() implies an
> (RCsc) RELEASE or stronger the primitive can do without providing
> anything itself.
>
> This turns out to be the case, a successful get_futex_key() implies a
> full memory barrier; recent: 1d0dcb3ad9d3 ("futex: Implement lockless
> wakeups").
Hmm while it is certainly true that get_futex_key() implies a full
barrier, I don't see why you're referring to the recent wake_q stuff;
where the futex "wakeup" is done much after futex_atomic_op_inuser. Yes,
that too implies a barrier, but not wrt get_futex_key() -- which
fundamentally relies on get_futex_key_refs().
>
> And since get_futex_key() is fundamental to doing _anything_ with a
> futex, I think its semi-sane to rely on this.
Right, and it wouldn't be the first thing that relies on get_futex_key()
implying a full barrier.
next prev parent reply other threads:[~2015-08-29 1:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-26 18:16 Peter Zijlstra
2015-08-29 1:33 ` Davidlohr Bueso [this message]
2015-09-01 16:38 ` Peter Zijlstra
2015-09-01 16:31 ` Will Deacon
2015-09-01 16:42 ` Peter Zijlstra
2015-09-01 16:47 ` Will Deacon
2015-09-01 19:05 ` Thomas Gleixner
2015-09-02 12:55 ` Peter Zijlstra
2015-09-02 16:10 ` Chris Metcalf
2015-09-02 17:00 ` Peter Zijlstra
2015-09-02 17:25 ` Chris Metcalf
2015-09-02 21:18 ` Linus Torvalds
2015-09-04 17:25 ` Chris Metcalf
2015-09-05 17:53 ` Peter Zijlstra
2015-09-07 9:30 ` Will Deacon
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=1440811986.1831.9.camel@stgolabs.net \
--to=dave@stgolabs.net \
--cc=Vineet.Gupta1@synopsys.com \
--cc=ddaney@caviumnetworks.com \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=ralf@linux-mips.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=will.deacon@arm.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®