Re: [PATCH] wifi: mt76: dma: run threaded NAPI kthreads with SCHED_FIFO low priority
From: Fil Dunsky
Date: Wed Oct 21 2026 - 11:00:53 EST
Adding netdev to Cc, as suggested on the GitHub mirror of this patch [1],
since it touches the scheduling policy of threaded NAPI kthreads.
For context on why this is done in the driver rather than left to the
admin (chrt / sysfs): mt76 already does exactly this for its other
rx/status and tx workers (sched_set_fifo_low() for the usb and sdio
workers and for the tx worker), so the dma napi kthreads were the only
mt76 rx path left at SCHED_OTHER. A userspace chrt also has to race
the creation of the napi threads at boot and module reload.
Numbers from the setup in the commit message (MT7621 + MT7612E as 5 GHz
client, 3 runs x 5 min each, ~200-280 Mbit/s rx with userspace load):
stock: ~500 full-ring events / 5 min, watchdog
resets and MCU timeouts, occasional hard hang
this patch: 0 resets in 3 runs, rx 276-288 Mbit/s
stock + chrt -f 1: 0 resets in 3 runs, rx 249-273 Mbit/s
napi_threaded=0: 0 resets
rx ring 1024 (stock): 800-1300 full-ring events / run, more resets
A similar restart pattern is reported on single-core MT7620 at much
lower rates [2], which fits CPU contention rather than throughput as the
trigger.
[1] https://github.com/openwrt/mt76/pull/1164
[2] https://github.com/openwrt/mt76/issues/457
Thanks,
Fil