* Re: [PATCH] wifi: mt76: dma: run threaded NAPI kthreads with SCHED_FIFO low priority [not found] <20261020-b4-mt76-napi-fifo-v1-1-ac8a24e2062a@gmail.com> @ 2026-10-21 14:25 ` Fil Dunsky 2026-10-22 9:34 ` David Laight 0 siblings, 1 reply; 2+ messages in thread From: Fil Dunsky @ 2026-10-21 14:25 UTC (permalink / raw) To: nbd, lorenzo, ryder.lee Cc: shayne.chen, sean.wang, matthias.bgg, angelogioacchino.delregno, linux-wireless, linux-kernel, linux-arm-kernel, linux-mediatek, Fil Dunsky, netdev 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] wifi: mt76: dma: run threaded NAPI kthreads with SCHED_FIFO low priority 2026-10-21 14:25 ` [PATCH] wifi: mt76: dma: run threaded NAPI kthreads with SCHED_FIFO low priority Fil Dunsky @ 2026-10-22 9:34 ` David Laight 0 siblings, 0 replies; 2+ messages in thread From: David Laight @ 2026-10-22 9:34 UTC (permalink / raw) To: Fil Dunsky Cc: nbd, lorenzo, ryder.lee, shayne.chen, sean.wang, matthias.bgg, angelogioacchino.delregno, linux-wireless, linux-kernel, linux-arm-kernel, linux-mediatek, netdev On Wed, 21 Oct 2026 17:25:53 +0300 Fil Dunsky <filipp.dunsky@gmail.com> wrote: > Adding netdev to Cc, as suggested on the GitHub mirror of this patch [1], > since it touches the scheduling policy of threaded NAPI kthreads. I had to fix the same thing for other NAPI threads when doing some tests that were receiving 'silly numbers' of RTP (aka very short UDP) packets. There is a similar problem with the softint threads. Softint callbacks drop form being the very highest priority items to things that really won't be run in a timely manner. David > > 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 > > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-22 9:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261020-b4-mt76-napi-fifo-v1-1-ac8a24e2062a@gmail.com>
2026-10-21 14:25 ` [PATCH] wifi: mt76: dma: run threaded NAPI kthreads with SCHED_FIFO low priority Fil Dunsky
2026-10-22 9:34 ` David Laight
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox