[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250916044735.2316171-1-dolinux.peng@gmail.com>
Date: Tue, 16 Sep 2025 12:47:21 +0800
From: pengdonglin <dolinux.peng@...il.com>
To: tj@...nel.org,
tony.luck@...el.com,
jani.nikula@...ux.intel.com,
ap420073@...il.com,
jv@...sburgh.net,
freude@...ux.ibm.com,
bcrl@...ck.org,
trondmy@...nel.org,
longman@...hat.com,
kees@...nel.org
Cc: bigeasy@...utronix.de,
hdanton@...a.com,
paulmck@...nel.org,
linux-kernel@...r.kernel.org,
linux-rt-devel@...ts.linux.dev,
linux-nfs@...r.kernel.org,
linux-aio@...ck.org,
linux-fsdevel@...r.kernel.org,
linux-security-module@...r.kernel.org,
netdev@...r.kernel.org,
intel-gfx@...ts.freedesktop.org,
linux-wireless@...r.kernel.org,
linux-acpi@...r.kernel.org,
linux-s390@...r.kernel.org,
cgroups@...r.kernel.org,
pengdonglin <dolinux.peng@...il.com>
Subject: [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/20180829222021.GA29944@linux.vnet.ibm.com/
[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(-)
--
2.34.1
Powered by blists - more mailing lists