Skip to content

Finish off [smp_]read_barrier_depends()

Will Deacon linux-alpha linux-doc lkml virtualization 1 version Applied

Status from this message: Queued for v5.6, thank you both!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 12 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/13compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.hinclude/asm-generic/Kbuild include/asm-generic/rwonce.h include/linux/compiler.h +1 more+125 -1127 replies
1/13compiler.h: Split {READ, WRITE}_ONCE definitions out into rwonce.hinclude/asm-generic/Kbuild include/asm-generic/rwonce.h include/linux/compiler.h +1 more+125 -1120 replies
2/13READ_ONCE: Undefine internal __READ_ONCE_SIZE macro after useinclude/asm-generic/rwonce.h+2 -00 replies
2/13READ_ONCE: Undefine internal __READ_ONCE_SIZE macro after useinclude/asm-generic/rwonce.h+2 -00 replies
3/13READ_ONCE: Allow __READ_ONCE_SIZE cases to be overridden by the architectureinclude/asm-generic/rwonce.h+24 -40 replies
3/13READ_ONCE: Allow __READ_ONCE_SIZE cases to be overridden by the architectureinclude/asm-generic/rwonce.h+24 -40 replies
4/13vhost: Remove redundant use of read_barrier_depends() barrierdrivers/vhost/vhost.c+0 -50 replies
4/13vhost: Remove redundant use of read_barrier_depends() barrierdrivers/vhost/vhost.c+0 -50 replies
5/13alpha: Override READ_ONCE() with barriered implementationarch/alpha/include/asm/barrier.h arch/alpha/include/asm/rwonce.h+29 -540 replies
5/13alpha: Override READ_ONCE() with barriered implementationarch/alpha/include/asm/barrier.h arch/alpha/include/asm/rwonce.h+29 -540 replies
6/13READ_ONCE: Remove smp_read_barrier_depends() invocationinclude/asm-generic/rwonce.h+0 -10 replies
6/13READ_ONCE: Remove smp_read_barrier_depends() invocationinclude/asm-generic/rwonce.h+0 -10 replies
7/13alpha: Replace smp_read_barrier_depends() usage with smp_[r]mb()arch/alpha/include/asm/atomic.h arch/alpha/include/asm/pgtable.h mm/memory.c+14 -140 replies
7/13alpha: Replace smp_read_barrier_depends() usage with smp_[r]mb()arch/alpha/include/asm/atomic.h arch/alpha/include/asm/pgtable.h mm/memory.c+14 -140 replies
8/13locking/barriers: Remove definitions for [smp_]read_barrier_depends()include/asm-generic/barrier.h+0 -170 replies
8/13locking/barriers: Remove definitions for [smp_]read_barrier_depends()include/asm-generic/barrier.h+0 -170 replies
9/13Documentation/barriers: Remove references to [smp_]read_barrier_depends()Documentation/RCU/Design/Requirements/Requirements.html Documentation/memory-barriers.txt+13 -15413 replies
9/13Documentation/barriers: Remove references to [smp_]read_barrier_depends()Documentation/RCU/Design/Requirements/Requirements.html Documentation/memory-barriers.txt+13 -1540 replies
10/13tools/memory-model: Remove smp_read_barrier_depends() from informal doctools/memory-model/Documentation/explanation.txt+12 -142 replies
10/13tools/memory-model: Remove smp_read_barrier_depends() from informal doctools/memory-model/Documentation/explanation.txt+12 -140 replies
11/13powerpc: Remove comment about read_barrier_depends()arch/powerpc/include/asm/barrier.h+0 -22 replies
11/13powerpc: Remove comment about read_barrier_depends()arch/powerpc/include/asm/barrier.h+0 -20 replies
12/13include/linux: Remove smp_read_barrier_depends() from commentsinclude/linux/percpu-refcount.h include/linux/ptr_ring.h+2 -20 replies
12/13include/linux: Remove smp_read_barrier_depends() from commentsinclude/linux/percpu-refcount.h include/linux/ptr_ring.h+2 -20 replies
13/13checkpatch: Remove checks relating to [smp_]read_barrier_depends()scripts/checkpatch.pl+1 -80 replies
13/13checkpatch: Remove checks relating to [smp_]read_barrier_depends()scripts/checkpatch.pl+1 -80 replies

Reviews trailers per patch

6 of 26 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlan SternPaul E. McKenneyMichael EllermanYunjae Lee
SeriesA-b
1/13
1/13
2/13
2/13
3/13
3/13
4/13
4/13
5/13
5/13
6/13
6/13
7/13
7/13
8/13
8/13
9/13R-b
9/13R-b
10/13A-b A-b
10/13A-b A-b
11/13A-b
11/13A-b
12/13
12/13
13/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 00/13] Finish off [smp_]read_barrier_depends()

Hi all,

Although [smp_]read_barrier_depends() became part of READ_ONCE() in commit 76ebbe78f739 ("locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE()"), it still limps on in the Linux memory model with the sinister hope of attracting innocent new users so that it becomes impossible to remove altogether.

Let's strike before it's too late: there's only one user outside of arch/alpha/ and that lives in the vhost code which I don't think you can actually compile for Alpha. Even if you could, it appears to be redundant. The rest of these patches remove any mention of the barrier from Documentation and comments, as well as removing its use from the Alpha backend and finally dropping it from the memory model completely.

After this series, there are still two places where it is mentioned:

1. The Korean translation of memory-barriers.txt. I'd appreciate some help fixing this because it's not entirely a straightforward deletion.

2. The virtio vring tests under tools/. This is userspace code so I'm not too fussed about it.

There's a chunk of header reshuffling at the start of the series so that READ_ONCE() can sensibly be overridden by arch code.

Feedback welcome.

Cheers,

Will

Cc Yunjae Lee <[email protected]>
Cc SeongJae Park <[email protected]>
Cc "Paul E. McKenney" <[email protected]>
Cc Josh Triplett <[email protected]>
Cc Matt Turner <[email protected]>
Cc Ivan Kokshaysky <[email protected]>
Cc Richard Henderson <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Alan Stern <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Joe Perches <[email protected]>
Cc Boqun Feng <[email protected]>

--->8

Will Deacon (13):
compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.h
READ_ONCE: Undefine internal __READ_ONCE_SIZE macro after use
READ_ONCE: Allow __READ_ONCE_SIZE cases to be overridden by the
architecture
vhost: Remove redundant use of read_barrier_depends() barrier
alpha: Override READ_ONCE() with barriered implementation
READ_ONCE: Remove smp_read_barrier_depends() invocation
alpha: Replace smp_read_barrier_depends() usage with smp_[r]mb() locking/barriers: Remove definitions for [smp_]read_barrier_depends() Documentation/barriers: Remove references to
[smp_]read_barrier_depends()
tools/memory-model: Remove smp_read_barrier_depends() from informal
doc
powerpc: Remove comment about read_barrier_depends() include/linux: Remove smp_read_barrier_depends() from comments
checkpatch: Remove checks relating to [smp_]read_barrier_depends()

 .../RCU/Design/Requirements/Requirements.html |  11 +-
 Documentation/memory-barriers.txt             | 156 +-----------------
 arch/alpha/include/asm/atomic.h               |  16 +-
 arch/alpha/include/asm/barrier.h              |  61 +------
 arch/alpha/include/asm/pgtable.h              |  10 +-
 arch/alpha/include/asm/rwonce.h               |  22 +++
 arch/powerpc/include/asm/barrier.h            |   2 -
 drivers/vhost/vhost.c                         |   5 -
 include/asm-generic/Kbuild                    |   1 +
 include/asm-generic/barrier.h                 |  17 --
 include/asm-generic/rwonce.h                  | 131 +++++++++++++++
 include/linux/compiler.h                      | 114 +------------
 include/linux/compiler_attributes.h           |  12 ++
 include/linux/percpu-refcount.h               |   2 +-
 include/linux/ptr_ring.h                      |   2 +-
 mm/memory.c                                   |   2 +-
 scripts/checkpatch.pl                         |   9 +-
 .../Documentation/explanation.txt             |  26 ++-
 18 files changed, 217 insertions(+), 382 deletions(-)
 create mode 100644 arch/alpha/include/asm/rwonce.h
 create mode 100644 include/asm-generic/rwonce.h
Signature · 1 line
2.24.0.rc1.363.gb1bccd3e3d-goog