Think commit in ndb's stanging repo sounds interesting:

https://git.openwrt.org/?p=openwrt/staging/nbd.git;a=commitdiff;h=4eca0cc9acd3a9e56a8a418142b62603464e1a59

kernel: add patch that adds support for running threaded NAPI poll functions

This is helps on workloads with CPU intensive poll functions (e.g. 802.11) on multicore systems

For some drivers (especially 802.11 drivers), doing a lot of work in the NAPI poll function does not perform well. Since NAPI poll is bound to the CPU it was scheduled from, we can easily end up with a few very busy CPUs spending most of their time in softirq/ksoftirqd and some idle ones.

Introduce threaded NAPI for such drivers based on a workqueue. The API is the same except for using netif_threaded_napi_add instead of netif_napi_add.

In my tests with mt76 on MT7621 using threaded NAPI + a thread for tx scheduling improves LAN->WLAN bridging throughput by 10-50%. Throughput without threaded NAPI is wildly inconsistent, depending on the CPU that runs the tx scheduling thread.

With threaded NAPI it seems stable and consistent (and higher than the best results I got without it).

(I haven't tested it yet.)

1 Like