Re: [PATCH 5/5] thunderbolt: stream: Add support for busy polling
Lukas Wunner <[email protected]>
| Newsgroups | org.kernel.vger.linux-usb |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jul 28, 2026 at 01:51:41PM +0200, Mika Westerberg wrote: > Using interrupts and scheduling workers increase latency so latency > critical applications may want to avoid that. Make this possible in > USB4STREAM by adding a new ConfigFS attribute: busy_poll that, when > activated switches the rings to polling mode. The cost for lower latency > is that this burns more CPU cycles and things like poll(2) cannot be > used. Hm, would it be possible to auto-detect whether polling is more performant for the current workload and automatically enable and disable it? E.g. by counting the number of interrupts in a given interval and enabling/disabling polling based on a high water mark / low water mark? Those marks could then be finetuned from user space, but moving in and out of polling automatically would be more desirable I think. Forcing polling could be achieved by setting the water marks to a special value, e.g. 0 or UINT_MAX. Thanks, Lukas