netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	Jason Xing <kerneljasonxing@gmail.com>,
	Daniel Jurgens <danielj@nvidia.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"xuanzhuo@linux.alibaba.com" <xuanzhuo@linux.alibaba.com>,
	"virtualization@lists.linux.dev" <virtualization@lists.linux.dev>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"abeni@redhat.com" <abeni@redhat.com>,
	Parav Pandit <parav@nvidia.com>
Subject: Re: [PATCH net-next] virtio_net: Add TX stop and wake counters
Date: Sun, 4 Feb 2024 07:39:36 -0500	[thread overview]
Message-ID: <20240204070920-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEu0x9zr09DChJtnTP4R-Tot=5gAYb3Tx2V1EMbEk3oEGw@mail.gmail.com>

On Sun, Feb 04, 2024 at 09:20:18AM +0800, Jason Wang wrote:
> On Sat, Feb 3, 2024 at 12:01 AM Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > On Fri, 2 Feb 2024 14:52:59 +0800 Jason Xing wrote:
> > > > Can you say more? I'm curious what's your use case.
> > >
> > > I'm not working at Nvidia, so my point of view may differ from theirs.
> > > From what I can tell is that those two counters help me narrow down
> > > the range if I have to diagnose/debug some issues.
> >
> > right, i'm asking to collect useful debugging tricks, nothing against
> > the patch itself :)
> >
> > > 1) I sometimes notice that if some irq is held too long (say, one
> > > simple case: output of printk printed to the console), those two
> > > counters can reflect the issue.
> > > 2) Similarly in virtio net, recently I traced such counters the
> > > current kernel does not have and it turned out that one of the output
> > > queues in the backend behaves badly.
> > > ...
> > >
> > > Stop/wake queue counters may not show directly the root cause of the
> > > issue, but help us 'guess' to some extent.
> >
> > I'm surprised you say you can detect stall-related issues with this.
> > I guess virtio doesn't have BQL support, which makes it special.
> 
> Yes, virtio-net has a legacy orphan mode, this is something that needs
> to be dropped in the future. This would make BQL much more easier to
> be implemented.


It's not that we can't implement BQL, it's that it does not seem to
be benefitial - has been discussed many times.

> > Normal HW drivers with BQL almost never stop the queue by themselves.
> > I mean - if they do, and BQL is active, then the system is probably
> > misconfigured (queue is too short). This is what we use at Meta to
> > detect stalls in drivers with BQL:
> >
> > https://lore.kernel.org/all/20240131102150.728960-3-leitao@debian.org/
> >
> > Daniel, I think this may be a good enough excuse to add per-queue stats
> > to the netdev genl family, if you're up for that. LMK if you want more
> > info, otherwise I guess ethtool -S is fine for now.
> >
> 
> Thanks


  reply	other threads:[~2024-02-04 12:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 14:25 [PATCH net-next] virtio_net: Add TX stop and wake counters Daniel Jurgens
2024-01-30 14:58 ` Michael S. Tsirkin
2024-01-30 15:40   ` Daniel Jurgens
2024-01-30 15:41     ` Michael S. Tsirkin
2024-01-30 15:50       ` Daniel Jurgens
2024-01-30 15:53         ` Michael S. Tsirkin
2024-01-30 17:33           ` Daniel Jurgens
2024-01-31  2:54             ` Jason Xing
2024-02-02  4:21               ` Jakub Kicinski
2024-02-02  6:52                 ` Jason Xing
2024-02-02 16:01                   ` Jakub Kicinski
2024-02-02 16:46                     ` Daniel Jurgens
2024-02-02 17:38                       ` Jakub Kicinski
2024-06-07  9:16                       ` Jason Xing
2024-06-07 12:36                         ` Dan Jurgens
2024-06-08  0:41                           ` Jason Xing
2024-06-10 17:57                             ` Jakub Kicinski
2024-06-11  2:05                               ` Jason Xing
2024-02-04  1:20                     ` Jason Wang
2024-02-04 12:39                       ` Michael S. Tsirkin [this message]
2024-02-05  1:45                         ` Jason Wang
2024-02-07 20:21                           ` Michael S. Tsirkin
2024-02-07 19:38                         ` Daniel Jurgens
2024-02-07 20:19                           ` Michael S. Tsirkin
2024-02-07 20:59                             ` Daniel Jurgens
2024-02-20 18:02                               ` Dan Jurgens
2024-02-20 18:05                                 ` Michael S. Tsirkin
2024-02-20 22:27                                   ` Jakub Kicinski
2024-01-30 15:16 ` Heng Qi
2024-01-30 15:43   ` Daniel Jurgens
2024-01-30 15:52     ` Michael S. Tsirkin

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=20240204070920-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=abeni@redhat.com \
    --cc=danielj@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jasowang@redhat.com \
    --cc=kerneljasonxing@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=parav@nvidia.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.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;
as well as URLs for NNTP newsgroup(s).