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
Conversation
Master branch: 29eef85 |
Master branch: 4e874b1 |
d6e81f1
to
a788719
Compare
Master branch: 09710d8 |
a788719
to
e1ec35f
Compare
Master branch: 72e1781 |
e1ec35f
to
aef1421
Compare
Master branch: 38261f3 |
aef1421
to
7afbc47
Compare
Master branch: 3103836 |
7afbc47
to
815ce24
Compare
Master branch: e31eec7 |
815ce24
to
d402b41
Compare
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>
Master branch: 66fe332 |
d402b41
to
73b8990
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=554131 irrelevant now. Closing PR. |
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