Linux USB
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: linux-usb@vger.kernel.org, netdev@vger.kernel.org,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	Lukas Wunner <lukas@wunner.de>,
	Andreas Noever <andreas.noever@gmail.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH 2/2] net: thunderbolt: Update ring indices only after all frames are queued
Date: Mon, 7 Sep 2026 07:53:59 +0200	[thread overview]
Message-ID: <20260907055359.GS106095@black.igk.intel.com> (raw)
In-Reply-To: <20260905135702.1af66dde@kernel.org>

Hi,

On Sat, Sep 05, 2026 at 01:57:02PM -0700, Jakub Kicinski wrote:
> On Wed,  2 Sep 2026 10:21:28 +0200 Mika Westerberg wrote:
> > Take advantage of the new API and update the ring producer/consumer
> > indices only after the frames have been queued. This reduces the number
> > of doorbell register writes from one per frame to one per batch.
> > 
> > Measured using iperf3 over a Thunderbolt/USB4 net connection between
> > Arrow Lake and Panther Lake systems (average of three runs):
> > 
> >   before         after
> >   ~14.3 Gbit/s   ~15.3 Gbit/s
> 
> Acked-by: Jakub Kicinski <kuba@kernel.org>

Thanks!

I applied these two to thunderbolt.git/next.

> but Clashiko (sort of) hints at lack of proper handling of transient
> memory allocation failures. Indeed the NAPI path seems to call
> tbnet_alloc_rx_buffers() which flushes the ring completely on
> any sign of trouble. (a) aren't we freeing buffers already handed
> to HW; (b) if we flush Rx free list and there's no Tx won't the driver
> wedge Rx and never schedule NAPI?
> 
> I'd suggest fixing that first before making any optimizations :S

I would have fixed these prior had I known they existed ;-) I will look
into these.

      reply	other threads:[~2026-09-07  5:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02  8:21 [PATCH 0/2] thunderbolt / net: Allow batching of descriptors Mika Westerberg
2026-09-02  8:21 ` [PATCH 1/2] thunderbolt: " Mika Westerberg
2026-09-02  8:21 ` [PATCH 2/2] net: thunderbolt: Update ring indices only after all frames are queued Mika Westerberg
2026-09-05 20:57   ` Jakub Kicinski
2026-09-07  5:53     ` Mika Westerberg [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=20260907055359.GS106095@black.igk.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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