mbox series

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

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

Message

Hou Tao July 28, 2023, 2:30 a.m. UTC
From: Hou Tao <houtao1@huawei.com>

Hi,

The patchset aims to remove unnecessary synchronizations in cpu-map
which were found during code inspection. 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.

Simply testing the patchset by running xdp_redirect_cpu test for
virtio-net and no issues are reported. Hope to get more feedback before
removing the RFC tag. As ususal, comments and suggestions are always
welcome.

Regards,
Tao

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

 kernel/bpf/cpumap.c | 110 +++++++++++++-------------------------------
 1 file changed, 31 insertions(+), 79 deletions(-)

Comments

Hou Tao Aug. 10, 2023, 3:22 a.m. UTC | #1
ping ? Any feedback about this patch set ?

On 7/28/2023 10:30 AM, Hou Tao wrote:
> From: Hou Tao <houtao1@huawei.com>
>
> Hi,
>
> The patchset aims to remove unnecessary synchronizations in cpu-map
> which were found during code inspection. 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.
>
> Simply testing the patchset by running xdp_redirect_cpu test for
> virtio-net and no issues are reported. Hope to get more feedback before
> removing the RFC tag. As ususal, comments and suggestions are always
> welcome.
>
> Regards,
> Tao
>
> Hou Tao (2):
>   bpf, cpumap: Use queue_rcu_work() to remove unnecessary rcu_barrier()
>   bpf, cpumap: Clean up bpf_cpu_map_entry directly in cpu_map_free
>
>  kernel/bpf/cpumap.c | 110 +++++++++++++-------------------------------
>  1 file changed, 31 insertions(+), 79 deletions(-)
>