Linux USB
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-usb@vger.kernel.org,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	Andreas Noever <andreas.noever@gmail.com>,
	Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Subject: Re: [PATCH 5/5] thunderbolt: stream: Add support for busy polling
Date: Wed, 29 Jul 2026 16:47:58 +0200	[thread overview]
Message-ID: <amoSnhr833oztrqK@wunner.de> (raw)
In-Reply-To: <20260728115141.2585464-6-mika.westerberg@linux.intel.com>

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

      reply	other threads:[~2026-07-29 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 11:51 [PATCH 0/5] thunderbolt: USB4STREAM improvements Mika Westerberg
2026-07-28 11:51 ` [PATCH 1/5] thunderbolt: stream: Restore consumer if copying from iter fails Mika Westerberg
2026-07-28 11:51 ` [PATCH 2/5] thunderbolt: stream: Fix possible short reads/writes Mika Westerberg
2026-07-28 11:51 ` [PATCH 3/5] thunderbolt: stream: Support IOCB_NOWAIT in non-blocking I/O as well Mika Westerberg
2026-07-28 11:51 ` [PATCH 4/5] thunderbolt: Make interrupt optional for rings Mika Westerberg
2026-07-28 11:51 ` [PATCH 5/5] thunderbolt: stream: Add support for busy polling Mika Westerberg
2026-07-29 14:47   ` Lukas Wunner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=amoSnhr833oztrqK@wunner.de \
    --to=lukas@wunner.de \
    --cc=YehezkelShB@gmail.com \
    --cc=alan.borzeszkowski@linux.intel.com \
    --cc=andreas.noever@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox