Skip to content

Remove redundant rcu_read_lock/unlock() in spin_lock

pengdonglin cgroups intel-gfx linux-acpi linux-fsdevel linux-nfs linux-rt-devel linux-s390 linux-security-module linux-wireless lkml netdev 3 versions – Applied

Status from this message: Applied to cgroup/for-6.18.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 9 repliesApplied
  2. v21 patch 3 repliesSuperseded
  3. v11 patch 7 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/14ACPI: APEI: Remove redundant rcu_read_lock/unlock() in spin_lockdrivers/acpi/apei/ghes.c+0 -22 replies
2/14drm/i915/gt: Remove redundant rcu_read_lock/unlock() in spin_lockdrivers/gpu/drm/i915/gt/intel_ring_submission.c+0 -20 replies
3/14fs: aio: Remove redundant rcu_read_lock/unlock() in spin_lockfs/aio.c+2 -40 replies
4/14nfs: Remove redundant rcu_read_lock/unlock() in spin_lockfs/nfs/callback_proc.c fs/nfs/nfs4state.c fs/nfs/pnfs.c +1 more+1 -190 replies
5/14s390/pkey: Remove redundant rcu_read_lock/unlock() in spin_lockdrivers/s390/crypto/pkey_base.c+0 -31 reply
6/14ipc: Remove redundant rcu_read_lock/unlock() in spin_lockipc/msg.c ipc/sem.c ipc/shm.c +1 more+0 -50 replies
7/14yama: Remove redundant rcu_read_lock/unlock() in spin_locksecurity/yama/yama_lsm.c+0 -40 replies
8/14cgroup: Remove redundant rcu_read_lock/unlock() in spin_lockkernel/cgroup/cgroup.c kernel/cgroup/debug.c+0 -61 reply
9/14cgroup/cpuset: Remove redundant rcu_read_lock/unlock() in spin_lockkernel/cgroup/cpuset.c+0 -61 reply
10/14wifi: mac80211: Remove redundant rcu_read_lock/unlock() in spin_locknet/mac80211/cfg.c net/mac80211/debugfs.c net/mac80211/debugfs_netdev.c +2 more+0 -100 replies
11/14net: ncsi: Remove redundant rcu_read_lock/unlock() in spin_locknet/ncsi/ncsi-manage.c+0 -21 reply
12/14net: amt: Remove redundant rcu_read_lock/unlock() in spin_lockdrivers/net/amt.c+0 -80 replies
13/14net: bonding: Remove redundant rcu_read_lock/unlock() in spin_lockdrivers/net/bonding/bond_3ad.c+0 -20 replies
14/14wifi: ath9k: Remove redundant rcu_read_lock/unlock() in spin_lockdrivers/net/wireless/ath/ath9k/xmit.c+0 -21 reply

Reviews trailers per patch

5 of 14 patches have a Reviewed-by or Acked-by.

PatchWaiman LongPaul FertserHarald FreudenbergerHanjun GuoToke Høiland-Jørgensen
1/14R-b
2/14
3/14
4/14
5/14A-b
6/14
7/14
8/14
9/14A-b
10/14
11/14R-b
12/14
13/14
14/14A-b

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

Read the v3 thread

Cover letter [PATCH v3 00/14] Remove redundant rcu_read_lock/unlock() in spin_lock

Since commit a8bb74acd8efe ("rcu: Consolidate RCU-sched update-side function definitions") there is no difference between rcu_read_lock(), rcu_read_lock_bh() and rcu_read_lock_sched() in terms of RCU read section and the relevant grace period. That means that spin_lock(), which implies rcu_read_lock_sched(), also implies rcu_read_lock().

There is no need no explicitly start a RCU read section if one has already been started implicitly by spin_lock().

Simplify the code and remove the inner rcu_read_lock() invocation.

[1] https://elixir.bootlin.com/linux/v6.17-rc5/source/Documentation/RCU/rcu_dereference.rst#L407
[2] https://lore.kernel.org/lkml/[email protected]/
[3] https://lwn.net/Articles/777036/
[4] https://lore.kernel.org/lkml/6435833a-bdcb-4114-b29d-28b7f436d47d@paulmck-laptop/

pengdonglin (14):
ACPI: APEI: Remove redundant rcu_read_lock/unlock() in spin_lock drm/i915/gt: Remove redundant rcu_read_lock/unlock() in spin_lock
fs: aio: Remove redundant rcu_read_lock/unlock() in spin_lock
nfs: Remove redundant rcu_read_lock/unlock() in spin_lock s390/pkey: Remove redundant rcu_read_lock/unlock() in spin_lock
ipc: Remove redundant rcu_read_lock/unlock() in spin_lock
yama: Remove redundant rcu_read_lock/unlock() in spin_lock
cgroup: Remove redundant rcu_read_lock/unlock() in spin_lock cgroup/cpuset: Remove redundant rcu_read_lock/unlock() in spin_lock
wifi: mac80211: Remove redundant rcu_read_lock/unlock() in spin_lock
net: ncsi: Remove redundant rcu_read_lock/unlock() in spin_lock
net: amt: Remove redundant rcu_read_lock/unlock() in spin_lock
net: bonding: Remove redundant rcu_read_lock/unlock() in spin_lock
wifi: ath9k: Remove redundant rcu_read_lock/unlock() in spin_lock

 drivers/acpi/apei/ghes.c                        |  2 --
 drivers/gpu/drm/i915/gt/intel_ring_submission.c |  2 --
 drivers/net/amt.c                               |  8 --------
 drivers/net/bonding/bond_3ad.c                  |  2 --
 drivers/net/wireless/ath/ath9k/xmit.c           |  2 --
 drivers/s390/crypto/pkey_base.c                 |  3 ---
 fs/aio.c                                        |  6 ++----
 fs/nfs/callback_proc.c                          |  2 --
 fs/nfs/nfs4state.c                              |  2 --
 fs/nfs/pnfs.c                                   | 12 +-----------
 fs/nfs/pnfs_dev.c                               |  4 ----
 ipc/msg.c                                       |  1 -
 ipc/sem.c                                       |  1 -
 ipc/shm.c                                       |  1 -
 ipc/util.c                                      |  2 --
 kernel/cgroup/cgroup.c                          |  2 --
 kernel/cgroup/cpuset.c                          |  6 ------
 kernel/cgroup/debug.c                           |  4 ----
 net/mac80211/cfg.c                              |  2 --
 net/mac80211/debugfs.c                          |  2 --
 net/mac80211/debugfs_netdev.c                   |  2 --
 net/mac80211/debugfs_sta.c                      |  2 --
 net/mac80211/sta_info.c                         |  2 --
 net/ncsi/ncsi-manage.c                          |  2 --
 security/yama/yama_lsm.c                        |  4 ----
 25 files changed, 3 insertions(+), 75 deletions(-)
Signature · 1 line
2.34.1