๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Eric Dumazet Thu, 19 Nov 2026 07:45
Re: [PATCH v3 net-next 7/7] selftest: packetdrill: Add test for tcp_collapse().
#19033
Author: Eric Dumazet
Date: Thu, 19 Nov 2026 07:45
38 lines
10362 bytes
Le jeu. 19 nov. 2026 ร  08:17, Kuniyuki Iwashima <kuniyu@google.com> a รฉcrit :
>
> tcp_collapse() now does not collapse high-density skbs and a
> low-density skb sandwiched by high-density skbs.
>
> tcp_rcv_collapse_bloated.pkt verifies the behaviour by
>
>  1. set a large SO_RCVBUF
>  2. send one high-density skb with 100 bytes read()
>  3. send one high-density skb
>  4. send one low-density skb
>  5. send one high-density skb
>  6. send 30 low-density skbs
>  7. send one high-density skb
>  8. set a small SO_RCVBUF
>  9. send a small data to trigger tcp_collapse()
> 10. check TcpExtTCPRcvCollapsed via nstat
>
> Without the series, the first high-density skb is collapsed.
> In addition, the first low-density skb drags the following
> high-density skb into collapsing, consuming more memory.
>
> If we remove sk_forced_mem_schedule() without this series,
> sk->sk_forward_alloc becomes negative at the end of tcp_collapse().
>
> Note that 30 segments are to make the memory savings large
> enough so that the margin can absorb minor size delta of
> struct sk_buff or L1_CACHE_BYTES across configs.
>
> skb truesize, TCP_COLLAPSE_MAX_SIZE, TCP_COLLAPSE_SCALING_RATIO
> depend on PAGE_SIZE being 4K, so the test is skipped if getconf
> returns non-4K PAGE_SIZE.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>

Reviewed-by: Eric Dumazet <edumazet@kernel.org>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads