From: Hou Tao <houtao@huaweicloud.com>
To: bpf@vger.kernel.org, netdev@vger.kernel.org,
"Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: "David S . Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
"Jesper Dangaard Brouer" <hawk@kernel.org>,
"John Fastabend" <john.fastabend@gmail.com>,
"Björn Töpel" <bjorn.topel@gmail.com>,
"Martin KaFai Lau" <martin.lau@linux.dev>,
"Alexei Starovoitov" <alexei.starovoitov@gmail.com>,
"Andrii Nakryiko" <andrii@kernel.org>,
"Song Liu" <song@kernel.org>, "Hao Luo" <haoluo@google.com>,
"Yonghong Song" <yonghong.song@linux.dev>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"KP Singh" <kpsingh@kernel.org>,
"Stanislav Fomichev" <sdf@google.com>,
"Jiri Olsa" <jolsa@kernel.org>,
houtao1@huawei.com
Subject: [PATCH bpf-next 0/2] Remove unnecessary synchronizations in cpumap
Date: Wed, 16 Aug 2023 12:59:56 +0800 [thread overview]
Message-ID: <20230816045959.358059-1-houtao@huaweicloud.com> (raw)
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
next reply other threads:[~2023-08-16 4:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 4:59 Hou Tao [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230816045959.358059-1-houtao@huaweicloud.com \
--to=houtao@huaweicloud.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=bjorn.topel@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=haoluo@google.com \
--cc=hawk@kernel.org \
--cc=houtao1@huawei.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=toke@redhat.com \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).