Skip to content

bpf, sockmap: Improve performance with CPU affinity #8857

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

Open
wants to merge 3 commits into
base: bpf-next_base
Choose a base branch
from

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: bpf, sockmap: Improve performance with CPU affinity
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=957610

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 91dbac4
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=957610
version: 1

mrpre added 2 commits April 28, 2025 08:57
Since the helper list is effectively frozen and the existing helpers
cannot be extended, we add a new kfunc instead which simply set the
redir_cpu to psock.

The new kfunc is used to set redir_cpu to psock.

All these changes conform to the kfuncs.rst documentation.

Signed-off-by: Jiayuan Chen <[email protected]>
Introduce a sk_psock_schedule_delayed_work() wrapper function, which calls
schedule_delayed_work_on() to specify the CPU for running the workqueue if
the BPF program has set the redirect CPU using
bpf_sk_skb_set_redirect_cpu(). Otherwise, it falls back to the original
logic.

Signed-off-by: Jiayuan Chen <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 224ee86
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=957610
version: 1

Add cpu-affinity for sockmap bench. Also add no-verify args to avoid
validating data for performance enhancements.

Signed-off-by: Jiayuan Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant