[SRU][N:linux-bluefield][PATCH v1 0/1] net: page_pool: scale alloc cache with PAGE_SIZE
Stav Aviram
saviram at nvidia.com
Sun Apr 5 09:02:38 UTC 2026
BugLink: https://bugs.launchpad.net/bugs/2147290
SRU Justification:
[Impact]
On BlueField-3 DPU with linux-bluefield-6.8 kernel (based on Ubuntu 24.04 noble), creating a large number of sub-functions (SFs) via devlink (for example 1600+ `devlink port add ... flavour pcisf` instances) causes severe host memory pressure. In the reported scenario, available memory dropped from roughly 22 GiB to about 4 GiB after creating on the order of 1685 SFs, while total used memory rose dramatically.
The root cause is that `page_pool` uses fixed alloc-cache sizing (`PP_ALLOC_CACHE_SIZE` / `PP_ALLOC_CACHE_REFILL`) tuned for 4 KiB pages and NAPI/XDP behavior. On BlueField kernels (Ubuntu 24.04 Noble and Ubuntu 22.04 Jammy based kernels), each cached entry corresponds to a much larger backing page, so the same object counts multiply the per-pool memory footprint. Many network devices allocate page pools per queue or logical port; scaling SF count multiplies that cost and can exhaust memory on 32 GiB systems even when traffic is idle.
[Fix]
Cherry picking the upstream commit:
"net: page_pool: scale alloc cache with PAGE_SIZE"
The change scales `PP_ALLOC_CACHE_REFILL` (and hence `PP_ALLOC_CACHE_SIZE`, which remains twice the refill watermark) by `PAGE_SIZE` so that cache footprint in bytes is balanced across page sizes. On 4 KiB page builds the values stay 64 / 128; on 16 KiB and 64 KiB pages they are reduced (16 / 32 and 4 / 8 respectively), cutting redundant cached page capacity where the old constants were grossly oversized.
[Test Case]
Compiled tested on linux-bluefield-6.8 on master-next branch.
[Regression Potential]
Low. The change is confined to compile-time constants in `include/net/page_pool/types.h`, and was accepted upstream.
Nimrod Oren (1):
net: page_pool: scale alloc cache with PAGE_SIZE
include/net/page_pool/types.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
--
2.38.1
More information about the kernel-team
mailing list