Re: [RFC net-next] net: page_pool: cap alloc cache size and refill by pool ring size
From: Nimrod Oren <hidden>
Date: 2026-02-26 15:30:05
Also in:
lkml
From: Nimrod Oren <hidden>
Date: 2026-02-26 15:30:05
Also in:
lkml
On 25/02/2026 1:39, Jakub Kicinski wrote:
I'd simply change the defines based on PAGE_SIZE. The allocation batch size has nothing to do with the ring size, it's just amortizing allocations within a single NAPI cycle.
Thanks, that sounds good to me. Do you think a formula like this would work? #define PP_ALLOC_CACHE_REFILL ((64 * SZ_4K) / PAGE_SIZE) #define PP_ALLOC_CACHE_SIZE (PP_ALLOC_CACHE_REFILL * 2) It keeps both values constant in bytes across page sizes, ensuring a consistent memory footprint for pool alloc-caches regardless of a system's page size.