lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACGkMEsphvgtvaFFob3OjJ-UuuDEVgqyg3pahaGvGZkAsioAFg@mail.gmail.com>
Date: Mon, 5 Feb 2024 09:45:38 +0800
From: Jason Wang <jasowang@...hat.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: Jakub Kicinski <kuba@...nel.org>, Jason Xing <kerneljasonxing@...il.com>, 
	Daniel Jurgens <danielj@...dia.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>, 
	"xuanzhuo@...ux.alibaba.com" <xuanzhuo@...ux.alibaba.com>, 
	"virtualization@...ts.linux.dev" <virtualization@...ts.linux.dev>, 
	"davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>, 
	"abeni@...hat.com" <abeni@...hat.com>, Parav Pandit <parav@...dia.com>
Subject: Re: [PATCH net-next] virtio_net: Add TX stop and wake counters

On Sun, Feb 4, 2024 at 8:39 PM Michael S. Tsirkin <mst@...hat.com> wrote:
>
> 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@...nel.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,

Well, I don't say we can't, I say it's not easy as we need to deal
with the switching between two modes[1]. If we just have one mode like
TX interrupt, we don't need to care about that.

> it's that it does not seem to
> be benefitial - has been discussed many times.

Virtio doesn't differ from other NIC too much, for example gve supports bql.

1) There's no numbers in [1]
2) We only benchmark vhost-net but not others, for example, vhost-user
and hardware implementations
3) We don't have interrupt coalescing in 2018 but now we have with DIM

Thanks

[1] https://lore.kernel.org/netdev/20181205225323.12555-1-mst@redhat.com/


>
> > > 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
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ