All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	mingo@kernel.org
Cc: stern@rowland.harvard.edu, parri.andrea@gmail.com,
	will.deacon@arm.com, peterz@infradead.org, boqun.feng@gmail.com,
	npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk,
	luc.maranget@inria.fr, akiyks@gmail.com,
	Andrea Parri <andrea.parri@amarulasolutions.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH memory-model 07/19] tools/memory-model: Model 'smp_store_mb()'
Date: Mon, 14 May 2018 16:33:45 -0700	[thread overview]
Message-ID: <1526340837-12222-7-git-send-email-paulmck@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180514233328.GA7601@linux.vnet.ibm.com>

From: Andrea Parri <andrea.parri@amarulasolutions.com>

This commit models 'smp_store_mb(x, val);' to be semantically equivalent
to 'WRITE_ONCE(x, val); smp_mb();'.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
---
 tools/memory-model/linux-kernel.def | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/memory-model/linux-kernel.def b/tools/memory-model/linux-kernel.def
index 397e4e67e8c8..acf86f6f360a 100644
--- a/tools/memory-model/linux-kernel.def
+++ b/tools/memory-model/linux-kernel.def
@@ -14,6 +14,7 @@ smp_store_release(X,V) { __store{release}(*X,V); }
 smp_load_acquire(X) __load{acquire}(*X)
 rcu_assign_pointer(X,V) { __store{release}(X,V); }
 rcu_dereference(X) __load{once}(X)
+smp_store_mb(X,V) { __store{once}(X,V); __fence{mb}; }
 
 // Fences
 smp_mb() { __fence{mb} ; }
-- 
2.5.2

  parent reply	other threads:[~2018-05-14 23:32 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14 23:33 [PATCH memory-model 0/19] Updates to the formal memory model Paul E. McKenney
2018-05-14 23:33 ` [PATCH memory-model 01/19] tools/memory-model: Rename link and rcu-path to rcu-link and rb Paul E. McKenney
2018-05-15  6:27   ` [tip:locking/core] " tip-bot for Alan Stern
2018-05-14 23:33 ` [PATCH memory-model 02/19] tools/memory-model: Redefine rb in terms of rcu-fence Paul E. McKenney
2018-05-15  6:27   ` [tip:locking/core] " tip-bot for Alan Stern
2018-05-14 23:33 ` [PATCH memory-model 03/19] tools/memory-model: Update required version of herdtools7 Paul E. McKenney
2018-05-15  6:28   ` [tip:locking/core] " tip-bot for Akira Yokosawa
2018-05-14 23:33 ` [PATCH memory-model 04/19] tools/memory-model: Fix cheat sheet typo Paul E. McKenney
2018-05-15  6:28   ` [tip:locking/core] " tip-bot for Paolo Bonzini
2018-05-14 23:33 ` [PATCH memory-model 05/19] tools/memory-order: Improve key for SELF and SV Paul E. McKenney
2018-05-15  6:29   ` [tip:locking/core] " tip-bot for Paul E. McKenney
2018-05-14 23:33 ` [PATCH memory-model 06/19] tools/memory-order: smp_mb__after_atomic() orders later RMW operations Paul E. McKenney
2018-05-15  6:29   ` [tip:locking/core] tools/memory-order: Update the cheat-sheet to show that " tip-bot for Paul E. McKenney
2018-05-14 23:33 ` Paul E. McKenney [this message]
2018-05-15  6:30   ` [tip:locking/core] tools/memory-model: Model 'smp_store_mb()' tip-bot for Andrea Parri
2018-05-14 23:33 ` [PATCH memory-model 08/19] tools/memory-model: Fix coding style in 'linux-kernel.def' Paul E. McKenney
2018-05-15  6:30   ` [tip:locking/core] " tip-bot for Andrea Parri
2018-05-14 23:33 ` [PATCH memory-model 09/19] tools/memory-model: Add scripts to test memory model Paul E. McKenney
2018-05-15  6:31   ` [tip:locking/core] " tip-bot for Paul E. McKenney
2018-05-14 23:33 ` [PATCH memory-model 10/19] tools/memory-model: Add model support for spin_is_locked Paul E. McKenney
2018-05-15  6:31   ` [tip:locking/core] tools/memory-model: Add model support for spin_is_locked() tip-bot for Luc Maranget
2018-05-14 23:33 ` [PATCH memory-model 11/19] tools/memory-model: Flag "cumulativity" and "propagation" tests Paul E. McKenney
2018-05-15  6:32   ` [tip:locking/core] " tip-bot for Paul E. McKenney
2018-05-14 23:33 ` [PATCH memory-model 12/19] tools/memory-model: Remove duplicated code from lock.cat Paul E. McKenney
2018-05-15  6:32   ` [tip:locking/core] " tip-bot for Alan Stern
2018-05-14 23:33 ` [PATCH memory-model 13/19] tools/memory-model: Improve comments in lock.cat Paul E. McKenney
2018-05-15  6:33   ` [tip:locking/core] " tip-bot for Alan Stern
2018-05-14 23:33 ` [PATCH memory-model 14/19] tools/memory-model: Improve mixed-access checking " Paul E. McKenney
2018-05-15  6:33   ` [tip:locking/core] " tip-bot for Alan Stern
2018-05-14 23:33 ` [PATCH memory-model 15/19] tools/memory-model: Remove out-of-date comments and code from lock.cat Paul E. McKenney
2018-05-15  6:34   ` [tip:locking/core] " tip-bot for Alan Stern
2018-05-14 23:33 ` [PATCH memory-model 16/19] tools/memory-model: Fix coding style in 'lock.cat' Paul E. McKenney
2018-05-15  6:34   ` [tip:locking/core] " tip-bot for Andrea Parri
2018-05-14 23:33 ` [PATCH memory-model 17/19] MAINTAINERS: Update e-mail address for Andrea Parri Paul E. McKenney
2018-05-15  6:35   ` [tip:locking/core] MAINTAINERS, tools/memory-model: " tip-bot for Andrea Parri
2018-05-14 23:33 ` [PATCH memory-model 18/19] tools/memory-model: Update ASPLOS information Paul E. McKenney
2018-05-15  6:35   ` [tip:locking/core] " tip-bot for Andrea Parri
2018-05-14 23:33 ` [PATCH memory-model 19/19] tools/memory-model: Add reference for 'Simplifying ARM concurrency' Paul E. McKenney
2018-05-15  6:36   ` [tip:locking/core] " tip-bot for Andrea Parri
2018-05-15  6:15 ` [PATCH memory-model 0/19] Updates to the formal memory model Ingo Molnar
2018-05-15 16:20   ` 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=1526340837-12222-7-git-send-email-paulmck@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akiyks@gmail.com \
    --cc=andrea.parri@amarulasolutions.com \
    --cc=boqun.feng@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=j.alglave@ucl.ac.uk \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luc.maranget@inria.fr \
    --cc=mingo@kernel.org \
    --cc=npiggin@gmail.com \
    --cc=parri.andrea@gmail.com \
    --cc=peterz@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.