Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf: do not invoke the XDP dispatcher for PROG_RUN with single repeat #1844

Closed
wants to merge 2 commits into from

Conversation

kernel-patches-bot
Copy link

Pull request for series with
subject: bpf: do not invoke the XDP dispatcher for PROG_RUN with single repeat
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=554131

@kernel-patches-bot
Copy link
Author

Master branch: 29eef85
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=554131
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 4e874b1
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=554131
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 09710d8
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=554131
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 72e1781
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=554131
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 38261f3
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=554131
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 3103836
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=554131
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: e31eec7
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=554131
version: 1

Nobody and others added 2 commits September 29, 2021 13:57
We have a unit test that invokes an XDP program with 1m different
inputs, aka 1m BPF_PROG_RUN syscalls. We run this test concurrently
with slight variations in how we generated the input.

Since commit f23c4b3 ("bpf: Start using the BPF dispatcher in BPF_TEST_RUN")
the unit test has slowed down significantly. Digging deeper reveals that
the concurrent tests are serialised in the kernel on the XDP dispatcher.
This is a global resource that is protected by a mutex, on which we contend.

Fix this by not calling into the XDP dispatcher if we only want to perform
a single run of the BPF program.

See: https://lore.kernel.org/bpf/CACAyw9_y4QumOW35qpgTbLsJ532uGq-kVW-VESJzGyiZkypnvw@mail.gmail.com/

Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
@kernel-patches-bot
Copy link
Author

Master branch: 66fe332
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=554131
version: 1

@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=554131 irrelevant now. Closing PR.

@kernel-patches-bot kernel-patches-bot deleted the series/554131=>bpf-next branch September 29, 2021 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants