netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] Remove unnecessary synchronizations in cpumap
@ 2023-08-16  4:59 Hou Tao
  2023-08-16  4:59 ` [PATCH bpf-next 1/2] bpf, cpumap: Use queue_rcu_work() to remove unnecessary rcu_barrier() Hou Tao
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hou Tao @ 2023-08-16  4:59 UTC (permalink / raw)
  To: bpf, netdev, Toke Høiland-Jørgensen
  Cc: David S . Miller, Jakub Kicinski, Jesper Dangaard Brouer,
	John Fastabend, Björn Töpel, Martin KaFai Lau,
	Alexei Starovoitov, Andrii Nakryiko, Song Liu, Hao Luo,
	Yonghong Song, Daniel Borkmann, KP Singh, Stanislav Fomichev,
	Jiri Olsa, houtao1

From: Hou Tao <houtao1@huawei.com>

Hi,

This is the formal patchset to remove unnecessary synchronizations in
cpu-map after address comments and collect Rvb tags from Toke
Høiland-Jørgensen (Big thanks to Toke). Patch #1 removes the unnecessary
rcu_barrier() when freeing bpf_cpu_map_entry and replaces it by
queue_rcu_work(). Patch #2 removes the unnecessary call_rcu() and
queue_work() when destroying cpu-map and does the freeing directly.

Test the patchset by using xdp_redirect_cpu and virtio-net. Both
xdp-mode and skb-mode have been exercised and no issues were reported.
As ususal, comments and suggestions are always welcome.

Change Log:
v1:
  * address comments from Toke Høiland-Jørgensen
  * add Rvb tags from Toke Høiland-Jørgensen
  * update outdated comment in cpu_map_delete_elem()

RFC: https://lore.kernel.org/bpf/20230728023030.1906124-1-houtao@huaweicloud.com

Hou Tao (2):
  bpf, cpumap: Use queue_rcu_work() to remove unnecessary rcu_barrier()
  bpf, cpumask: Clean up bpf_cpu_map_entry directly in cpu_map_free

 kernel/bpf/cpumap.c | 113 ++++++++++++++------------------------------
 1 file changed, 35 insertions(+), 78 deletions(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-21 22:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-16  4:59 [PATCH bpf-next 0/2] Remove unnecessary synchronizations in cpumap Hou Tao
2023-08-16  4:59 ` [PATCH bpf-next 1/2] bpf, cpumap: Use queue_rcu_work() to remove unnecessary rcu_barrier() Hou Tao
2023-08-16  4:59 ` [PATCH bpf-next 2/2] bpf, cpumask: Clean up bpf_cpu_map_entry directly in cpu_map_free Hou Tao
2023-08-21 22:30 ` [PATCH bpf-next 0/2] Remove unnecessary synchronizations in cpumap patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).