Re: [PATCH net-next] net: ena: reuse the whole RX page on 64kB page kernels
From: Arthur Kiyanovski
Date: Fri Nov 13 2026 - 19:15:20 EST
On 2026-11-11 16:47:51-08:00, Jakub Kicinski wrote:
> On Fri, 06 Nov 2026 03:17:11 +0000 Harry Yoo (Meta) wrote:
>
> > This shows up when RX data stays in socket receive queues, as each
> > queued skb keeps the whole 64kB page alive while at most 16kB of it
> > holds data. On an EC2 t4g.large instance (64kB pages, 8GB memory) with
> > 519MB left unread across 64 TCP sockets, RX pages pinned 2869MB of
> > memory while the socket layer accounted only 687MB.
>
> I'm not sure you're actually fixing the problem you're describing?
> You optimize the memory use but the (unused) tail of the buffer is
> still not charged to any skb, is it? Or does it now fit perfectly?
>
> Normally when the page can no longer be chunked up we should charge
> the tail to whoever happened to use it last (see the page pool code
> which does that).
>
> Either way, you have to respin this on top of Breno's fix which
> was applied earlier today.
Jakub,
If I understand correctly what you are saying, you are correct.
skb->truesize is still not reported correctly.
The focus in this patch is different. It is about using the whole
64KB page instead of only the first 16KB.
Harry's own figures show most of it is recovered — 497MB pinned for
519MB unread, against 2869MB before — so the remaining gap is the
final tail of each page, not the 48kB.
So I agree the commit message needs to be more precise.
The skb->truesize fix can come as a separate fix after this one.
Thanks,
Arthur