Re: [PATCH v2] locking/rtmutex: Use acquire/release semantics

From: Davidlohr Bueso
Date: Mon Sep 28 2015 - 15:50:14 EST

On Sun, 27 Sep 2015, Thomas Gleixner wrote:

On Wed, 23 Sep 2015, Davidlohr Bueso wrote:

From: Davidlohr Bueso <dave@xxxxxxxxxxxx>

As such, weakly ordered archs can benefit from more relaxed use
of barriers when locking/unlocking.

That changelog is not really helpful if someone is going to look at it
half a year from now who doesn't have the background of the discussion
leading to these changes.

Ok, how does the following sound?

As of 654672d4ba1 (locking/atomics: Add _{acquire|release|relaxed}() variants
of some atomic operations) and 6d79ef2d30e (locking, asm-generic: Add
_{relaxed|acquire|release}() variants for 'atomic_long_t'), weakly ordered
archs can benefit from more relaxed use of barriers when locking and unlocking,
instead of regular full barrier semantics. While currently only arm64 supports
such optimizations, updating corresponding locking primitives serves for other
archs to immediately benefit as well, once the necessary machinery is implemented
of course.

It's not _that_ different from the original changelong, but it should allow
future readers to at least be able to easily see the context of where the
changes come from. I don't think it's of much use going into the actual code
changes as they are pretty obvious -- and the ones that aren't (ie relaxed)
have the justification in the comments.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at