Skip to content

RFC Remove to-be-unneeded smp_read_barrier_depends()

Paul E. McKenney keyrings linux-arch linux-fsdevel linux-mm linux-security-module lkml netdev netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest15 patches 45 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15doc: READ_ONCE() now implies smp_barrier_depends()Documentation/memory-barriers.txt+6 -50 replies
2/15mn10300: READ_ONCE() now implies smp_read_barrier_depends()arch/mn10300/kernel/mn10300-serial.c+5 -20 replies
3/15drivers/net/ethernet/qlogic/qed: Fix __qed_spq_block() orderingdrivers/net/ethernet/qlogic/qed/qed_spq.c+1 -30 replies
4/15fs/dcache: Use release-acquire for name/length updatefs/dcache.c+3 -70 replies
5/15percpu: READ_ONCE() now implies smp_read_barrier_depends()include/linux/percpu-refcount.h lib/percpu-refcount.c+7 -73 replies
6/15rcu: Adjust read-side accessor comments for READ_ONCE()include/linux/rcupdate.h+11 -120 replies
7/15rtnetlink: Update now-misleading smp_read_barrier_depends() commentinclude/linux/rtnetlink.h+1 -20 replies
8/15seqlock: Remove now-redundant smp_read_barrier_depends()include/linux/seqlock.h+1 -20 replies
9/15uprobes: Remove now-redundant smp_read_barrier_depends()kernel/events/uprobes.c+6 -60 replies
10/15locking: Remove smp_read_barrier_depends() from queued_spin_lock_slowpath()kernel/locking/qspinlock.c+5 -70 replies
11/15tracepoint: Remove smp_read_barrier_depends() from commentkernel/tracepoint.c+4 -53 replies
12/15lib/assoc_array: Remove smp_read_barrier_depends()include/linux/assoc_array_priv.h lib/assoc_array.c+5 -2035 replies
13/15mm/ksm: Remove now-redundant smp_read_barrier_depends()mm/ksm.c+1 -80 replies
14/15netfilter: Remove now-redundant smp_read_barrier_depends()net/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c net/ipv6/netfilter/ip6_tables.c+3 -182 replies
15/15keyring: Remove now-redundant smp_read_barrier_depends()security/keys/keyring.c+0 -70 replies

Reviews trailers per patch

2 of 15 patches have a Reviewed-by or Acked-by.

PatchSteven Rostedt (VMware)Mathieu DesnoyersTejun Heo
1/15
2/15
3/15
4/15
5/15A-b
6/15
7/15
8/15
9/15
10/15
11/15A-b A-b
12/15
13/15
14/15
15/15

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

Read the v1 thread

Cover letter [PATCH RFC tip/core/rcu 0/15] Remove to-be-unneeded smp_read_barrier_depends()

Hello!

Will Deacon has proposed adding smp_read_barrier_depends() to READ_ONCE(), which would mean that quite a few instances of smp_read_barrier_depends() would become redundant. This series depends on Will's change and removes those smp_read_barrier_depends(), while fixing a bug or two along the way. Some of these bugs are subtle, hence posting this sooner rather than later.

This patch series depends on an in-progress series from Mark Rutland that changes all calls to ACCESS_ONCE() to either READ_ONCE() or WRITE_ONCE(), depending. This patch series also depends on an upcoming patch from Will Deacon that adds smp_read_barrier_depends() to Alpha's relaxed/release RMW atomic operations.

As Will pointed out, once all of these patch series are in place, the core kernel will no longer need any Alpha-specific code, with the sole exception of READ_ONCE() and of course smp_read_barrier_depends() itself.

Pretty cool, huh? ;-)

Thanx, Paul

------------------------------------------------------------------------

 Documentation/memory-barriers.txt         |   11 ++++++-----
 arch/mn10300/kernel/mn10300-serial.c      |    7 +++++--
 drivers/net/ethernet/qlogic/qed/qed_spq.c |    4 +---
 fs/dcache.c                               |   10 +++-------
 include/linux/assoc_array_priv.h          |    5 +++--
 include/linux/percpu-refcount.h           |    6 +++---
 include/linux/rcupdate.h                  |   23 +++++++++++------------
 include/linux/rtnetlink.h                 |    3 +--
 include/linux/seqlock.h                   |    3 +--
 kernel/events/uprobes.c                   |   12 ++++++------
 kernel/locking/qspinlock.c                |   12 +++++-------
 kernel/tracepoint.c                       |    9 ++++-----
 lib/assoc_array.c                         |   20 ++------------------
 lib/percpu-refcount.c                     |    8 ++++----
 mm/ksm.c                                  |    9 +--------
 net/ipv4/netfilter/arp_tables.c           |    7 +------
 net/ipv4/netfilter/ip_tables.c            |    7 +------
 net/ipv6/netfilter/ip6_tables.c           |    7 +------
 security/keys/keyring.c                   |    7 -------
 19 files changed, 59 insertions(+), 111 deletions(-)