Linux wireless drivers development
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] wifi: ath11k: isolate RXDMA page-frag lifetimes
@ 2026-07-19 21:58 Mark Ruvald Pedersen
  2026-07-19 21:58 ` [RFC PATCH 1/3] wifi: ath11k: reserve headroom when aligning RX buffers Mark Ruvald Pedersen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mark Ruvald Pedersen @ 2026-07-19 21:58 UTC (permalink / raw)
  To: linux-wireless; +Cc: Jeff Johnson, ath11k

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-19 21:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-19 21:58 [RFC PATCH 0/3] wifi: ath11k: isolate RXDMA page-frag lifetimes Mark Ruvald Pedersen
2026-07-19 21:58 ` [RFC PATCH 1/3] wifi: ath11k: reserve headroom when aligning RX buffers Mark Ruvald Pedersen
2026-07-19 21:58 ` [RFC PATCH 2/3] wifi: ath11k: make external IRQ control idempotent Mark Ruvald Pedersen
2026-07-19 21:58 ` [RFC PATCH 3/3] wifi: ath11k: use private page-frag caches for RXDMA rings Mark Ruvald Pedersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox