Linux-Doc Archive on lore.kernel.org
 help / color / Atom feed
* [RFC 0/3] tools/memory-model: Add litmus tests for atomic APIs
@ 2020-02-14  4:01 Boqun Feng
  2020-02-14  4:01 ` [RFC 1/3] Documentation/locking/atomic: Fix atomic-set litmus test Boqun Feng
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: Boqun Feng @ 2020-02-14  4:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alan Stern, Andrea Parri, Will Deacon, Peter Zijlstra,
	Boqun Feng, Nicholas Piggin, David Howells, Jade Alglave,
	Luc Maranget, Paul E. McKenney, Akira Yokosawa, Daniel Lustig,
	Jonathan Corbet, linux-arch, linux-doc

A recent discussion raises up the requirement for having test cases for
atomic APIs:

	https://lore.kernel.org/lkml/20200213085849.GL14897@hirez.programming.kicks-ass.net/

, and since we already have a way to generate a test module from a
litmus test with klitmus[1]. It makes sense that we add more litmus
tests for atomic APIs into memory-model.

So I begin to do this and the plan is to add the litmus tests we already
use in atomic_t.txt, ones from Paul's litmus collection[2], and any
other valuable litmus test we come up while adding the previous two
kinds of tests.

This patchset finishes the first part (adding atomic_t.txt litmus
tests). I also improve the atomic_t.txt to make it consistent with the
litmus tests.

One thing to note is patch #2 requires a modification to herd and I just
made a PR to Luc's repo:

	https://github.com/herd/herdtools7/pull/28

, so if this patchset looks good to everyone and someone plans to take
it (and I assume is Paul), please wait until that PR is settled. And
probably we need to bump the required herd version because of it.

Comments and suggesions are welcome!

Regards,
Boqun


[1]: http://diy.inria.fr/doc/litmus.html#klitmus
[2]: https://github.com/paulmckrcu/litmus/tree/master/manual/atomic

*** BLURB HERE ***

Boqun Feng (3):
  Documentation/locking/atomic: Fix atomic-set litmus test
  tools/memory-model: Add a litmus test for atomic_set()
  tools/memory-model: Add litmus test for RMW + smp_mb__after_atomic()

 Documentation/atomic_t.txt                    | 14 ++++-----
 ...+mb__after_atomic-is-strong-acquire.litmus | 29 +++++++++++++++++++
 .../Atomic-set-observable-to-RMW.litmus       | 24 +++++++++++++++
 tools/memory-model/litmus-tests/README        |  8 +++++
 4 files changed, 68 insertions(+), 7 deletions(-)
 create mode 100644 tools/memory-model/litmus-tests/Atomic-RMW+mb__after_atomic-is-strong-acquire.litmus
 create mode 100644 tools/memory-model/litmus-tests/Atomic-set-observable-to-RMW.litmus

-- 
2.25.0


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, back to index

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14  4:01 [RFC 0/3] tools/memory-model: Add litmus tests for atomic APIs Boqun Feng
2020-02-14  4:01 ` [RFC 1/3] Documentation/locking/atomic: Fix atomic-set litmus test Boqun Feng
2020-02-14  4:01 ` [RFC 2/3] tools/memory-model: Add a litmus test for atomic_set() Boqun Feng
2020-02-14  8:12   ` Andrea Parri
2020-02-14 10:40     ` Boqun Feng
2020-02-25  7:34       ` Boqun Feng
2020-02-25 13:01         ` Luc Maranget
2020-02-26  2:51           ` Boqun Feng
2020-02-14 15:47   ` Alan Stern
2020-02-14 23:52     ` Boqun Feng
2020-02-17 11:02       ` Peter Zijlstra
2020-02-14  4:01 ` [RFC 3/3] tools/memory-model: Add litmus test for RMW + smp_mb__after_atomic() Boqun Feng
2020-02-14  6:15   ` Boqun Feng
2020-02-14  8:18     ` Andrea Parri
2020-02-14  8:20       ` Boqun Feng
2020-02-14 15:58   ` Alan Stern
2020-02-15  0:09     ` Boqun Feng
2020-02-14  9:55 ` [RFC 0/3] tools/memory-model: Add litmus tests for atomic APIs Peter Zijlstra
2020-02-14 10:20 ` Paul E. McKenney
2020-02-14 15:27 ` Alan Stern
2020-02-14 23:39   ` Boqun Feng
2020-02-15 15:25   ` Paul E. McKenney
2020-02-16  5:43     ` Boqun Feng
2020-02-16 12:06       ` Paul E. McKenney
2020-02-16 16:16         ` Alan Stern
2020-02-17  1:27           ` Boqun Feng

Linux-Doc Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-doc/0 linux-doc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-doc linux-doc/ https://lore.kernel.org/linux-doc \
		linux-doc@vger.kernel.org
	public-inbox-index linux-doc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-doc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git