[PATCH v2 2/2] wifi: ath12k: use private page-frag caches for RXDMA rings
Jeff Johnson
jeff.johnson at oss.qualcomm.com
Fri Oct 9 07:35:24 PDT 2026
On 10/7/2026 2:38 PM, Nikolai Semendiaev wrote:
> RXDMA buffers allocated with dev_alloc_skb() share per-CPU page-fragment
> caches with other network users. Long-lived ring buffers can pin mostly
> unused 32-KiB backing pages as short-lived network allocations cycle
> through those caches. On QCN9274, OOM was observed during sustained WAN
> downloads when Ethernet and ath12k processing shared a CPU.
>
> Give regular and monitor RXDMA rings private page-fragment caches. The
> existing refill SRNG locks serialize cache access. Preserve NET_SKB_PAD,
> allocation flags and the DMA mapping and unmapping operations.
>
> Drain each monitor cache after releasing its IDR-owned buffers, and the
> regular RX cache after releasing its cookie-conversion descriptors.
> Disable external IRQ/NAPI processing before non-reset crash teardown;
> the reset worker already does so.
>
> Use skb_reserve() for DMA alignment because skb_pull() cannot advance
> an empty skb. Allocate extra alignment space for monitor status buffers
> to preserve at least RX_MON_STATUS_BUF_SIZE of DMA capacity.
>
> Based on Mark Ruvald Pedersen's ath11k per-ring page-fragment isolation.
>
> Link: https://lore.kernel.org/linux-wireless/20260719215817.2468580-4-wabsie@gmail.com/
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Nikolai Semendiaev <agent00791 at gmail.com>
This conflicts with a different proposal:
https://lore.kernel.org/all/20261008-ath12k-pp-v1-3-68f888cd7eec@oss.qualcomm.com/
More information about the ath12k
mailing list