[RFC PATCH 0/3] wifi: ath11k: isolate RXDMA page-frag lifetimes
Mark Ruvald Pedersen
wabsie at gmail.com
Sun Jul 19 14:58:14 PDT 2026
ath11k fills RXDMA rings with skb heads allocated by dev_alloc_skb().
Those allocations use shared per-CPU page-frag caches, so unrelated RXDMA
rings and other network users can place fragments with different
lifetimes on the same backing page.
On an IPQ8074-based Linksys MX4200, repeater/AP traffic made available
memory fall at roughly 12-16 MiB/min until OOM. Ring and IDR ownership
remained bounded while page-frag backing accumulated. Two ownership
captures found fragments from multiple allocation origins on 86-87% of
the final tracker-visible backing pages.
This RFC:
1. fixes an existing no-op alignment attempt on empty RX skbs;
2. makes sequential external IRQ/NAPI lifecycle transitions idempotent;
3. quiesces non-reset crash recovery before DP teardown, gives each
RXDMA ring a private page-frag cache, and drains it after the ring's
DMA mappings and skbs have been released.
No RX buffer or ring sizes are changed, and the existing per-buffer DMA
map/unmap lifecycle is unchanged.
page_pool should also be viable, but it is not a mechanical allocator
substitution here. These skb heads need about 2.5 KiB of backing, so an
order-0 pool uses one 4 KiB page per buffer. An order-1 fragmented pool
restores packing density but lacks page_frag_cache's lower-order fallback
under fragmentation. page_pool also adds fallible setup/unwind and
requires every skb return path to become pool-aware. This RFC keeps those
behaviors unchanged; I can prototype page_pool if that is the preferred
ath11k direction.
The AHB version was built as an OpenWrt backport and remained bounded in
natural-load, resident, and high-packet-rate pressure runs. PCI has not
been runtime-tested. The non-reset firmware-recovery path has not been
validated in isolation, so feedback on patches 2 and 3 is especially
welcome. The IRQ state guards make repeated sequential calls safe; they
do not add synchronization between concurrent lifecycle callers.
OpenWrt discussion:
https://github.com/openwrt/openwrt/pull/24254
Mark Ruvald Pedersen (3):
wifi: ath11k: reserve headroom when aligning RX buffers
wifi: ath11k: make external IRQ control idempotent
wifi: ath11k: use private page-frag caches for RXDMA rings
---
base-commit: 189721a4afa1804315e7dcfca9ca0539c7b1d7af
More information about the ath11k
mailing list