Linux Documentation
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Simon Schippers <simon.schippers@tu-dortmund.de>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	Jason Wang <jasowangio@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, Simon Horman <horms@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Tim Gebauer <tim.gebauer@tu-dortmund.de>,
	Brett Sheffield <brett@librecast.net>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v3] tun/tap & vhost-net: make qdisc backpressure opt-in via IFF_BACKPRESSURE
Date: Tue, 21 Jul 2026 10:59:52 -0400	[thread overview]
Message-ID: <20260721105853-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <5089fc5e-2fb8-41fb-9aab-42b22cc2c201@tu-dortmund.de>

On Tue, Jul 21, 2026 at 04:04:33PM +0200, Simon Schippers wrote:
> On 7/14/26 18:50, Simon Schippers wrote:
> > On 7/14/26 15:40, Michael S. Tsirkin wrote:
> >> On Thu, Jul 09, 2026 at 11:55:11AM +0200, Simon Schippers wrote:
> >>> Commit 1d6e569b7d0c ("tun/tap & vhost-net: avoid ptr_ring tail-drop
> >>> when a qdisc is present") did not show a relevant performance regression
> >>> in my testing but on Brett Sheffield's librecast testbed it shows a
> >>> significant performance drop in a IPv6 multicast testcase. The regression
> >>> can be pinpointed when multiple iperf3 TCP threads are sending. For 8
> >>> threads the performance dropped from 13.5 Gbit/s to 9.13 Gbit/s. This is
> >>> the reason why this patch makes the qdisc backpressure behavior opt-in.
> >>>
> >>> One option to accomplish the opt-in would be to set the default qdisc to
> >>> noqueue at init. However this may also break userspace as users might
> >>> have chosen a custom qdisc even though most of the qdiscs did nothing
> >>> for tun/tap in the past due to missing backpressure...
> >>>
> >>> This is the reason why in this patch, the flag IFF_BACKPRESSURE is
> >>> introduced instead which is required to enable the backpressure logic.
> >>> This means the stopping logic in tun_net_xmit() and the waking logic in
> >>> __tun_wake_queue() are skipped if the flag is disabled. Setting
> >>> IFF_BACKPRESSURE makes an attached qdisc effective by stopping the queue
> >>> instead of tail-dropping when the internal ring is full.
> >>>
> >>> To avoid a possible stall due to disabling IFF_BACKPRESSURE, the new
> >>> helper tun_force_wake_queue() is implemented. The helper safely wakes the
> >>> respective netdev queue and resets cons_cnt while the consumer_lock and
> >>> the producer_lock of the ring are held. The helper is run in tun_attach()
> >>> when a queue (re)attaches, in tun_set_iff() for attached tfiles, and
> >>> in tun_queue_resize().
> >>>
> >>> The documentation in tuntap.rst is updated accordingly.
> >>>
> >>> Fixes: 1d6e569b7d0c ("tun/tap & vhost-net: avoid ptr_ring tail-drop when a qdisc is present")
> >>> Reported-by: Brett Sheffield <brett@librecast.net>
> >>> Closes: https://lore.kernel.org/netdev/akVnoOYQOrt8k-Gu@karahi.librecast.net/T/#u
> >>> Signed-off-by: Simon Schippers <simon.schippers@tu-dortmund.de>
> >>
> >>
> >> The patch itself is fine:
> >>
> >> Acked-by: Michael S. Tsirkin <mst@redhat.com>
> >>
> >> What bothers me is the timing: we
> >> are past freeze and this new interface hasn't been tested
> >> much.
> >>
> >> We can either apply this, or revert the original patch for now
> >> and reapply with this for next.
> > 
> > I prefer applying it, but you maintainers must decide that.
> > 
> 
> Hi,
> just a gentle ping.
> Has there been any decision on this patch?
> 
> Thanks!


Hi netdev maintainers. Given there's a perf regression otherwise,
we should either take this or revert the original and reapply
in next.

Thanks!

-- 
MST


  reply	other threads:[~2026-07-21 15:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09  9:55 [PATCH net v3] tun/tap & vhost-net: make qdisc backpressure opt-in via IFF_BACKPRESSURE Simon Schippers
2026-07-09 16:06 ` Brett Sheffield
2026-07-14  6:57 ` Simon Schippers
2026-07-14 13:40 ` Michael S. Tsirkin
2026-07-14 16:50   ` Simon Schippers
2026-07-21 14:04     ` Simon Schippers
2026-07-21 14:59       ` Michael S. Tsirkin [this message]
2026-07-21 17:07         ` Jakub Kicinski
2026-07-15 14:01 ` kernel test robot
2026-07-15 14:32   ` Simon Schippers
2026-07-16  1:22     ` Oliver Sang

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=20260721105853-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=brett@librecast.net \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jasowangio@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=simon.schippers@tu-dortmund.de \
    --cc=skhan@linuxfoundation.org \
    --cc=tim.gebauer@tu-dortmund.de \
    --cc=willemdebruijn.kernel@gmail.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