Skip to content

wifi: ath12k: isolate RXDMA page-fragment caches

Nikolai Semendiaev ath12k linux-wireless 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v12 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Include linux/bug.h before linux/page_frag_cache.h in dp.c to make WARN_ON_ONCE available on Alpha. This fixes the build error reported by the kernel test robot:
https://lore.kernel.org/oe-kbuild-all/[email protected]/

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2wifi: ath12k: make external IRQ control idempotentdrivers/net/wireless/ath/ath12k/ahb.c drivers/net/wireless/ath/ath12k/pci.c+4 -62 replies
2/2wifi: ath12k: use private page-frag caches for RXDMA ringsdrivers/net/wireless/ath/ath12k/core.c drivers/net/wireless/ath/ath12k/dp.c drivers/net/wireless/ath/ath12k/dp.h +3 more+70 -161 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] wifi: ath12k: isolate RXDMA page-fragment caches

Hi,

This series adapts Mark Ruvald Pedersen's ath11k page-fragment cache changes to ath12k. On QCN9274, sustained WAN traffic
can exhaust memory when Ethernet and Wi-Fi run on the same CPU. Long-lived RXDMA buffers share per-CPU page-fragment caches with other network users and can pin mostly unused 32-KiB backing pages.

Patch 1 makes external IRQ transitions follow the NAPI state so that crash recovery can safely quiesce RXDMA before teardown. Patch 2 gives regular and monitor RXDMA rings private caches and drains them after their buffers have been released. It also fixes alignment of empty skbs and preserves monitor status buffer capacity after alignment.

The series is based on ath.git main at:
388d3c42e8aba1cfc3c6d2c52877a46d8cf740db (Linux 7.3-rc5). Runtime measurements were made on Linux 6.18.54, with Ethernet and Wi-Fi IRQs on CPU0:

Hardware: QCN9274 hw2.0 PCI
Firmware: WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1

Two 45-second downloads showed peak order-3 memory growth of 54 and 68 MiB. An earlier unpatched 45-second test grew by 187 MiB, and longer unpatched downloads reached OOM.

A five-minute download at about 660 Mbps transferred 24.8 GB without OOM. Peak growth was 105 MiB, falling to 35 MiB above baseline after one minute idle.

Thanks,
Nikolai

Changes in v2:
- Include linux/bug.h before linux/page_frag_cache.h in dp.c to make WARN_ON_ONCE available on Alpha. This fixes the build error reported by the kernel test robot:
https://lore.kernel.org/oe-kbuild-all/[email protected]/

Nikolai Semendiaev (2):
wifi: ath12k: make external IRQ control idempotent
wifi: ath12k: use private page-frag caches for RXDMA rings

 drivers/net/wireless/ath/ath12k/ahb.c    |  4 +--
 drivers/net/wireless/ath/ath12k/core.c   |  3 ++
 drivers/net/wireless/ath/ath12k/dp.c     |  4 +++
 drivers/net/wireless/ath/ath12k/dp.h     |  3 ++
 drivers/net/wireless/ath/ath12k/dp_mon.c | 29 +++++++++------
 drivers/net/wireless/ath/ath12k/dp_rx.c  | 45 +++++++++++++++++++++---
 drivers/net/wireless/ath/ath12k/dp_rx.h  |  2 ++
 drivers/net/wireless/ath/ath12k/pci.c    |  6 ++--
 8 files changed, 74 insertions(+), 22 deletions(-)

base-commit: 388d3c42e8aba1cfc3c6d2c52877a46d8cf740db

Signature · 1 line
2.43.0