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] [day] [month] [year] [list]
Message-ID: <20220308162802.0ecec1bf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Tue, 8 Mar 2022 16:28:02 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     David Ahern <dsahern@...nel.org>,
        Jeffrey Ji <jeffreyjilinux@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Brian Vazquez <brianvv@...gle.com>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Antoine Tenart <atenart@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Alexander Lobakin <alexandr.lobakin@...el.com>,
        Kumar Kartikeya Dwivedi <memxor@...il.com>,
        Arnd Bergmann <arnd@...db.de>, netdev <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        jeffreyji <jeffreyji@...gle.com>
Subject: Re: [PATCH v3 net-next] net-core: add rx_otherhost_dropped counter

On Tue, 8 Mar 2022 15:18:25 -0800 Eric Dumazet wrote:
> > that's an expensive packet counter for a common path (e.g., hosting
> > environments).  
> 
> This was the reason for the initial patch, using SNMP stat, being per cpu.
> 
> Adding per-device per-cpu data for this counter will increase cost of
> netdevice dismantle phase,
> and increase time for ndo_get_stats64(), especially on hosts with 256
> or 512 cpus.

Two ways to solve this:
 - make dev->pcpu_refcnt point to a structure which holds both
   refcnt and whatever stats
 - combine these stats into lstats, assuming the netdevs we care
   about spawning / destroying fast are sw devices anyway;
   struct rtnl_link_ops can indicate to the core if the driver
   wants lstats (or just put how many bytes it wants), otherwise 
   we'd only allocate enough mem for core's stats

Option three - both.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ