kernel_samsung_a53x/net/core
Eric Dumazet 38d1d83d12 net: give more chances to rcu in netdev_wait_allrefs_any()
[ Upstream commit cd42ba1c8ac9deb9032add6adf491110e7442040 ]

This came while reviewing commit c4e86b4363ac ("net: add two more
call_rcu_hurry()").

Paolo asked if adding one synchronize_rcu() would help.

While synchronize_rcu() does not help, making sure to call
rcu_barrier() before msleep(wait) is definitely helping
to make sure lazy call_rcu() are completed.

Instead of waiting ~100 seconds in my tests, the ref_tracker
splats occurs one time only, and netdev_wait_allrefs_any()
latency is reduced to the strict minimum.

Ideally we should audit our call_rcu() users to make sure
no refcount (or cascading call_rcu()) is held too long,
because rcu_barrier() is quite expensive.

Fixes: 0e4be9e57e8c ("net: use exponential backoff in netdev_wait_allrefs")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/all/28bbf698-befb-42f6-b561-851c67f464aa@kernel.org/T/#m76d73ed6b03cd930778ac4d20a777f22a08d6824
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:26:55 +01:00
..
bpf_sk_storage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
datagram.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
datagram.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dev.c net: give more chances to rcu in netdev_wait_allrefs_any() 2024-11-19 12:26:55 +01:00
dev_addr_lists.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dev_ioctl.c net: dev: Convert sa_data to flexible array in struct sockaddr 2024-11-18 22:25:41 +01:00
devlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drop_monitor.c drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group 2024-11-18 12:11:46 +01:00
dst.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dst_cache.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
failover.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib_notifier.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib_rules.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
filter.c bpf: net: Change sk_getsockopt() to take the sockptr_t argument 2024-11-18 23:19:51 +01:00
flow_dissector.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flow_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gen_estimator.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gen_stats.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gro_cells.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwbm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
link_watch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lwt_bpf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lwtunnel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
neighbour.c neighbour: Don't let neigh_forced_gc() disable preemption for long 2024-11-18 12:12:16 +01:00
net-procfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net-sysfs.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
net-sysfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net-traces.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net_namespace.c net: fix out-of-bounds access in ops_init 2024-11-19 11:32:49 +01:00
netclassid_cgroup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netevent.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netpoll.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netprio_cgroup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
page_pool.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pktgen.c net: pktgen: Fix interface flags printing 2024-11-08 11:26:11 +01:00
ptp_classifier.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
request_sock.c tcp: make sure init the accept_queue's spinlocks once 2024-11-18 12:12:59 +01:00
rtnetlink.c rtnetlink: Correct nested IFLA_VF_VLAN_LIST attribute validation 2024-11-19 11:32:45 +01:00
scm.c Revert "io_uring/unix: drop usage of io_uring socket" 2024-11-19 09:11:51 +01:00
secure_seq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
skbuff.c kcov: Remove kcov include from sched.h and move it to its users. 2024-11-19 11:32:46 +01:00
skmsg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sock.c net: mark racy access on sk->sk_rcvbuf 2024-11-19 11:32:43 +01:00
sock_diag.c sock_diag: annotate data-races around sock_diag_handlers[family] 2024-11-19 08:44:38 +01:00
sock_map.c bpf, sockmap: Prevent lock inversion deadlock in map delete elem 2024-11-19 09:22:46 +01:00
sock_reuseport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stream.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysctl_net_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timestamping.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tso.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
utils.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xdp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00