]> www.infradead.org Git - users/willy/pagecache.git/commit
Revert "net: skb: introduce and use a single page frag cache"
authorPaolo Abeni <pabeni@redhat.com>
Tue, 18 Feb 2025 18:29:40 +0000 (19:29 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 20 Feb 2025 09:53:25 +0000 (10:53 +0100)
commit6bc7e4eb0499562ccd291712fd7be0d1a5aad00a
treee523c2830703947257eb0a2e8cc1ce41bd4e227b
parent14ad6ed30a10afbe91b0749d6378285f4225d482
Revert "net: skb: introduce and use a single page frag cache"

After the previous commit is finally safe to revert commit dbae2b062824
("net: skb: introduce and use a single page frag cache"): do it here.

The intended goal of such change was to counter a performance regression
introduced by commit 3226b158e67c ("net: avoid 32 x truesize
under-estimation for tiny skbs").

Unfortunately, the blamed commit introduces another regression for the
virtio_net driver. Such a driver calls napi_alloc_skb() with a tiny
size, so that the whole head frag could fit a 512-byte block.

The single page frag cache uses a 1K fragment for such allocation, and
the additional overhead, under small UDP packets flood, makes the page
allocator a bottleneck.

Thanks to commit bf9f1baa279f ("net: add dedicated kmem_cache for
typical/small skb->head"), this revert does not re-introduce the
original regression. Actually, in the relevant test on top of this
revert, I measure a small but noticeable positive delta, just above
noise level.

The revert itself required some additional mangling due to recent updates
in the affected code.

Suggested-by: Eric Dumazet <edumazet@google.com>
Fixes: dbae2b062824 ("net: skb: introduce and use a single page frag cache")
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/linux/netdevice.h
net/core/dev.c
net/core/skbuff.c