mbox series

[bpf-next,0/2] Remove unnecessary synchronizations in cpumap

Message ID 20230816045959.358059-1-houtao@huaweicloud.com (mailing list archive)
Headers show
Series Remove unnecessary synchronizations in cpumap | expand

Message

Hou Tao Aug. 16, 2023, 4:59 a.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Aug. 21, 2023, 10:30 p.m. UTC | #1
Hello:

This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Wed, 16 Aug 2023 12:59:56 +0800 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [bpf-next,1/2] bpf, cpumap: Use queue_rcu_work() to remove unnecessary rcu_barrier()
    https://git.kernel.org/bpf/bpf-next/c/8f8500a247c9
  - [bpf-next,2/2] bpf, cpumask: Clean up bpf_cpu_map_entry directly in cpu_map_free
    https://git.kernel.org/bpf/bpf-next/c/c2e42ddf26ca

You are awesome, thank you!