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-next>] [day] [month] [year] [list]
Date:   Fri, 29 Jan 2021 11:35:55 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Jesper Dangaard Brouer <brouer@...hat.com>
Cc:     David Ahern <dsahern@...il.com>, netdev@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>, bpf@...r.kernel.org,
        Eric Dumazet <eric.dumazet@...il.com>,
        Daniel Borkmann <borkmann@...earbox.net>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>
Subject: Re: [PATCH net-next V1] net: adjust net_device layout for cacheline
 usage

On Fri, 29 Jan 2021 11:46:42 +0100 Jesper Dangaard Brouer wrote:
> > On Thu, 28 Jan 2021 20:51:23 -0700
> > David Ahern <dsahern@...il.com> wrote:
> > > A long over due look at the organization of this struct.  
> 
> Yes, I was surprised that the cache-lines used in fast-path was this
> spread out.

I tried measuring the cache misses on struct netdevice running
relatively network-heavy production workload once but they were 
really deep in the noise. Things become much easier to optimize
with a XDP micro-benchmark, but obviously should benefit all.

> There is a comment /* Cache lines mostly used on receive path */
> but that comment no-longer start on a cacheline, so I suspect that this
> have slowly diverted over time (Eric's commit 9356b8fc07 dates back to 2005).
> 
> Patch is already applied. I expected people to would say that I also
> needed to adjust the doc-type comments.  The comments describing the
> members, seems to be ordered the same way as defined.  Should we/I keep
> that order intact?  (when moving members)

kdoc didn't complain, and as you say it's already a mess, plus it's
two screen-fulls of scrolling away... 

I think converting to inline kdoc of members would be an improvement,
if you want to sign up for that? Otherwise -EDIDNTCARE on my side :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ