linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Will Deacon <will.deacon@arm.com>
Cc: linux-kernel@vger.kernel.org,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [RESEND PATCH] documentation: memory-barriers: fix smp_mb__before_spinlock() semantics
Date: Tue, 31 Mar 2015 19:50:50 +0200	[thread overview]
Message-ID: <20150331175050.GA14778@redhat.com> (raw)
In-Reply-To: <1427791181-21952-1-git-send-email-will.deacon@arm.com>

On 03/31, Will Deacon wrote:
>
> Could somebody pick this up please? I guess I could route it via the arm64
> tree with an Ack, but I'd rather it went through Paul or -tip.

I think this would be the best route ;)

> --- a/Documentation/memory-barriers.txt
> +++ b/Documentation/memory-barriers.txt
> @@ -1768,10 +1768,9 @@ for each construct.  These operations all imply certain barriers:
>  
>       Memory operations issued before the ACQUIRE may be completed after
>       the ACQUIRE operation has completed.  An smp_mb__before_spinlock(),
> -     combined with a following ACQUIRE, orders prior loads against
> -     subsequent loads and stores and also orders prior stores against
> -     subsequent stores.  Note that this is weaker than smp_mb()!  The
> -     smp_mb__before_spinlock() primitive is free on many architectures.
> +     combined with a following ACQUIRE, orders prior stores against
> +     subsequent loads and stores. Note that this is weaker than smp_mb()!
> +     The smp_mb__before_spinlock() primitive is free on many architectures.

I agree, this description was always wrong.

But perhaps you can also update the comment above smp_mb__before_spinlock?
It only documents the STORE - LOAD serialization, and this was on purpose.

But people started to use this helper assuming that it can also serialize
the STOREs. Perhaps the changelog could also mention this fact, this is why
we need to update this comment and fix memory-barriers.txt.

Oleg.


  reply	other threads:[~2015-03-31 17:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31  8:39 [RESEND PATCH] documentation: memory-barriers: fix smp_mb__before_spinlock() semantics Will Deacon
2015-03-31 17:50 ` Oleg Nesterov [this message]
2015-04-01 15:31   ` Paul E. McKenney
2015-04-01 15:50     ` Oleg Nesterov
2015-04-01 16:13       ` Will Deacon
2015-04-01 16:27         ` Paul E. McKenney
2015-04-01 15:26 ` Paul E. McKenney

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=20150331175050.GA14778@redhat.com \
    --to=oleg@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).