All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: dhowells@redhat.com,
	Andrea Parri <andrea.parri@amarulasolutions.com>,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>,
	Will Deacon <will.deacon@arm.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Jade Alglave <j.alglave@ucl.ac.uk>,
	Luc Maranget <luc.maranget@inria.fr>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Akira Yokosawa <akiyks@gmail.com>,
	Daniel Lustig <dlustig@nvidia.com>,
	Jonathan Corbet <corbet@lwn.net>, Ingo Molnar <mingo@redhat.com>,
	Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH] doc: Update wake_up() & co. memory-barrier guarantees
Date: Mon, 25 Jun 2018 13:12:45 +0100	[thread overview]
Message-ID: <2779.1529928765@warthog.procyon.org.uk> (raw)
In-Reply-To: <20180625095031.GX2494@hirez.programming.kicks-ass.net>

Peter Zijlstra <peterz@infradead.org> wrote:

> So yes, I suppose we're entirely suck with the full memory barrier
> semantics like that. But I still find it easier to think of it like a
> RELEASE that pairs with the ACQUIRE of waking up, such that the task
> is guaranteed to observe it's own wake condition.
> 
> And maybe that is the thing I'm missing here. These comments only state
> that it does in fact imply a full memory barrier, but do not explain
> why, should it?

I think because RELEASE and ACQUIRE concepts didn't really exist in Linux at
the time I wrote the doc, so the choices were read/readdep, write or full.

Since this document defines the *minimum* you can expect rather than what the
kernel actually gives you, I think it probably makes sense to switch to
RELEASE and ACQUIRE here.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: David Howells <dhowells@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: dhowells@redhat.com,
	Andrea Parri <andrea.parri@amarulasolutions.com>,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>,
	Will Deacon <will.deacon@arm.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Jade Alglave <j.alglave@ucl.ac.uk>,
	Luc Maranget <luc.maranget@inria.fr>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Akira Yokosawa <akiyks@gmail.com>,
	Daniel Lustig <dlustig@nvidia.com>,
	Jonathan Corbet <corbet@lwn.net>, Ingo Molnar <mingo@redhat.com>,
	Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH] doc: Update wake_up() & co. memory-barrier guarantees
Date: Mon, 25 Jun 2018 13:12:45 +0100	[thread overview]
Message-ID: <2779.1529928765@warthog.procyon.org.uk> (raw)
In-Reply-To: <20180625095031.GX2494@hirez.programming.kicks-ass.net>

Peter Zijlstra <peterz@infradead.org> wrote:

> So yes, I suppose we're entirely suck with the full memory barrier
> semantics like that. But I still find it easier to think of it like a
> RELEASE that pairs with the ACQUIRE of waking up, such that the task
> is guaranteed to observe it's own wake condition.
> 
> And maybe that is the thing I'm missing here. These comments only state
> that it does in fact imply a full memory barrier, but do not explain
> why, should it?

I think because RELEASE and ACQUIRE concepts didn't really exist in Linux at
the time I wrote the doc, so the choices were read/readdep, write or full.

Since this document defines the *minimum* you can expect rather than what the
kernel actually gives you, I think it probably makes sense to switch to
RELEASE and ACQUIRE here.

David

  parent reply	other threads:[~2018-06-25 12:12 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25  9:17 [PATCH] doc: Update wake_up() & co. memory-barrier guarantees Andrea Parri
2018-06-25  9:17 ` Andrea Parri
2018-06-25  9:50 ` Peter Zijlstra
2018-06-25  9:50   ` Peter Zijlstra
2018-06-25 10:56   ` Andrea Parri
2018-06-25 10:56     ` Andrea Parri
2018-06-25 12:31     ` Peter Zijlstra
2018-06-25 12:31       ` Peter Zijlstra
2018-06-25 13:16       ` Andrea Parri
2018-06-25 13:16         ` Andrea Parri
2018-06-25 14:18         ` Peter Zijlstra
2018-06-25 14:18           ` Peter Zijlstra
2018-06-25 14:56           ` Andrea Parri
2018-06-25 14:56             ` Andrea Parri
2018-06-25 15:44             ` Daniel Lustig
2018-06-25 15:44               ` Daniel Lustig
2018-06-25 16:38               ` Peter Zijlstra
2018-06-25 16:38                 ` Peter Zijlstra
2018-06-25 16:37             ` Peter Zijlstra
2018-06-25 16:37               ` Peter Zijlstra
2018-06-26 10:09               ` Andrea Parri
2018-06-26 10:09                 ` Andrea Parri
2018-06-26 15:30                 ` Peter Zijlstra
2018-06-26 15:30                   ` Peter Zijlstra
2018-06-27 14:15       ` Andrea Parri
2018-06-27 14:15         ` Andrea Parri
2018-06-25 12:12   ` David Howells [this message]
2018-06-25 12:12     ` David Howells
2018-06-25 12:28     ` Andrea Parri
2018-06-25 12:28       ` Andrea Parri
2018-06-25 13:00       ` Peter Zijlstra
2018-06-25 13:00         ` Peter Zijlstra
2018-06-25 16:56 ` Alan Stern
2018-06-25 16:56   ` Alan Stern
2018-06-26 10:11   ` Andrea Parri
2018-06-26 10:11     ` Andrea Parri
2018-06-26 13:49     ` Alan Stern
2018-06-26 13:49       ` Alan Stern

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=2779.1529928765@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=akiyks@gmail.com \
    --cc=andrea.parri@amarulasolutions.com \
    --cc=boqun.feng@gmail.com \
    --cc=corbet@lwn.net \
    --cc=dlustig@nvidia.com \
    --cc=j.alglave@ucl.ac.uk \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luc.maranget@inria.fr \
    --cc=mingo@redhat.com \
    --cc=npiggin@gmail.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rdunlap@infradead.org \
    --cc=stern@rowland.harvard.edu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.