[PATCH ath-next v2 0/2] wifi: ath10k: spread the PCI copy engine interrupts over the CPUs
From: Julius Bairaktaris
Date: Sat Nov 21 2026 - 12:54:15 EST
The PCI ath10k devices are capable of multiple MSI, and with all
their vectors the firmware interrupt and each copy engine have one of
their own. ath10k has asked for a single vector since commit
cfe9011a05a8 ("ath10k: remove MSI range support"), so all the copy
engine interrupts and the NAPI they schedule run on one CPU.
That commit dropped per copy engine handlers and tasklets along with
the vector block. 2/2 brings back only the block: every vector keeps
the one handler that schedules the NAPI for all copy engines, so the
copy engine locking and NAPI stay as they are and only the CPU the
interrupts land on changes.
Only the chips used in access points take the block (QCA988X, QCA9887,
QCA99X0, QCA9984, QCA9888). QCA6174, QCA6164 and QCA9377, the Wi-Fi and
Bluetooth combination chips, keep one vector and no affinity hint, as
now.
1/2 fixes the probe error path, which leaves MSI enabled on the device
after a failed probe. 2/2 requests the vector block the copy engine
layout needs, or one vector, and spreads the vectors over the CPUs.
On the AX3600, uploading 83-84 Mbit/s over the QCA9889, the HTT copy
engine's 37326-37927 interrupts in 14 s moved from CPU0 (21-22% busy,
37957-38630 interrupts without the patch) to its vector on CPU2 (21-23%
busy), and downloading 87-88 Mbit/s CPU2 was 8-13% busy against 15-17%
for CPU0 without the patch; the system total stays within the spread of
idle priority spinners, 16-33% of one CPU with and 16-34% without (3
runs each). With the block not granted one vector is used and carries
38285 interrupts in 14 s at 84 Mbit/s, and a firmware crash forced
through debugfs recovers with the vectors on the same CPUs (1 run each).
Without 1/2 an injected probe failure gave a WARNING in
msi_device_data_release() (kernel/irq/msi.c:294), and the router then
stopped answering; with 1/2 there was no WARNING and the rebind used 8
MSI vectors (1 run each).
Changes in v2:
- 1/2 is new: the err_deinit_irq label of ath10k_pci_probe() did not
release the interrupt mode, so a failed probe left MSI enabled on the
device.
- 2/2: Jeff Johnson pointed out that mobile clients want their
interrupts on as few CPUs as possible. Only QCA988X, QCA9887,
QCA99X0, QCA9984 and QCA9888 take the vector block now; QCA6174,
QCA6164 and QCA9377 keep one vector and no affinity hint.
- 2/2: Loic Poulain asked to say why cfe9011a05a8 removed the vector
block and how this differs; the commit message does, and the comment
above ath10k_pci_interrupt_handler() that still described per copy
engine handlers is updated.
- 2/2: Sashiko pointed out that the maximum of CE_COUNT_MAX + 1 vectors
is not a power of two, which multi-MSI cannot encode and some MSI
controllers do not accept. v2 requests exactly
roundup_pow_of_two(MSI_ASSIGN_CE_MAX + 1) vectors, and one vector if
the block is not granted.
- 2/2: Loic Poulain asked why pci_alloc_irq_vectors_affinity() is not
used. The answer is at
https://lore.kernel.org/all/20261114210506.787342-1-julius@xxxxxxxxxxxxxx/
and the commit message now says why PCI_IRQ_AFFINITY is not used.
- Rebased onto ath-next-20261118.
v1:
https://lore.kernel.org/all/20261101164247.258200-1-julius@xxxxxxxxxxxxxx/
I used Claude (Anthropic) to help write these patches.
Julius Bairaktaris (2):
wifi: ath10k: release the PCI interrupt mode when probe fails
wifi: ath10k: spread the PCI copy engine interrupts over the CPUs
drivers/net/wireless/ath/ath10k/hw.c | 3 +
drivers/net/wireless/ath/ath10k/hw.h | 2 +
drivers/net/wireless/ath/ath10k/pci.c | 87 ++++++++++++++++++++++-----
drivers/net/wireless/ath/ath10k/pci.h | 3 +
4 files changed, 79 insertions(+), 16 deletions(-)
base-commit: 1983b40acfcb3c3464b291c85977290a785bcfdc
--
2.53.0