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: <CANn89iLu8K1CA1rABkucVyxog5t35_OTZEsDpHt5KV0Yj-faGg@mail.gmail.com>
Date: Wed, 21 Aug 2024 10:54:04 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, pabeni@...hat.com
Subject: Re: [PATCH net-next] net: repack struct netdev_queue

On Tue, Aug 20, 2024 at 10:51 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> Adding the NAPI pointer to struct netdev_queue made it grow into another
> cacheline, even though there was 44 bytes of padding available.
>
> The struct was historically grouped as follows:
>
>     /* read-mostly stuff (align) */
>     /* ... random control path fields ... */
>     /* write-mostly stuff (align) */
>     /* ... 40 byte hole ... */
>     /* struct dql (align) */
>
> It seems that people want to add control path fields after
> the read only fields. struct dql looks pretty innocent
> but it forces its own alignment and nothing indicates that
> there is a lot of empty space above it.
>
> Move dql above the xmit_lock. This shifts the empty space
> to the end of the struct rather than in the middle of it.
> Move two example fields there to set an example.
> Hopefully people will now add new fields at the end of
> the struct. A lot of the read-only stuff is also control
> path-only, but if we move it all we'll have another hole
> in the middle.

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ