-
Notifications
You must be signed in to change notification settings - Fork 130
tcp_bpf: improve ingress redirection performance with message corking #8968
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
Conversation
Upstream branch: b615ce5 |
7b56de2
to
49174bd
Compare
Upstream branch: b615ce5 |
423e2b2
to
7cc3768
Compare
49174bd
to
f3a4188
Compare
Upstream branch: 25b6d5d |
7cc3768
to
bc40b09
Compare
f3a4188
to
f10d83e
Compare
Upstream branch: 4e2e684 |
bc40b09
to
2b91ef5
Compare
f10d83e
to
9857a0f
Compare
Upstream branch: d90f0bc |
2b91ef5
to
9bdfae1
Compare
9857a0f
to
b93b30b
Compare
Upstream branch: 5ead949 |
9bdfae1
to
28d6bf2
Compare
b93b30b
to
f4bae1b
Compare
Upstream branch: 6888a03 |
28d6bf2
to
d400a9a
Compare
f4bae1b
to
b8dcdbb
Compare
Upstream branch: 8259eb0 |
d400a9a
to
1b712d6
Compare
b8dcdbb
to
e85324d
Compare
Upstream branch: bfccacd |
1b712d6
to
47e8719
Compare
e85324d
to
61c8df2
Compare
The name sk_msg_alloc is misleading, that function does not allocate sk_msg at all, it simply refills sock page frags. Rename it to sk_msg_expand() to better reflect what it actually does. Signed-off-by: Cong Wang <[email protected]>
Optimizing redirect ingress performance requires frequent allocation and deallocation of sk_msg structures. Introduce a dedicated kmem_cache for sk_msg to reduce memory allocation overhead and improve performance. Reviewed-by: Cong Wang <[email protected]> Signed-off-by: Zijian Zhang <[email protected]>
This patch aims to save some space in struct sk_psock and prepares for the next patch which will add more fields. psock->eval can only have 4 possible values, make it 8-bit is sufficient. psock->redir_ingress is just a boolean, using 1 bit is enough. Signed-off-by: Cong Wang <[email protected]>
The TCP_BPF ingress redirection path currently lacks the message corking mechanism found in standard TCP. This causes the sender to wake up the receiver for every message, even when messages are small, resulting in reduced throughput compared to regular TCP in certain scenarios. This change introduces a kernel worker-based intermediate layer to provide automatic message corking for TCP_BPF. While this adds a slight latency overhead, it significantly improves overall throughput by reducing unnecessary wake-ups and reducing the sock lock contention. Reviewed-by: Amery Hung <[email protected]> Co-developed-by: Cong Wang <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: Zijian Zhang <[email protected]>
Upstream branch: 079e5c5 |
47e8719
to
f09ac83
Compare
Pull request for series with
subject: tcp_bpf: improve ingress redirection performance with message corking
version: 3
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=964331