[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a7286ffb-0de5-bb9c-7dc4-7d88d952bb2f@gmail.com>
Date: Tue, 9 Oct 2018 13:52:22 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Heiner Kallweit <hkallweit1@...il.com>,
David Ahern <dsahern@...il.com>,
David Miller <davem@...emloft.net>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
David Laight <David.Laight@...LAB.COM>
Subject: Re: [PATCH net-next v2] net: core: change bool members of struct
net_device to bitfield members
On 10/09/2018 01:24 PM, Heiner Kallweit wrote:
> Reordering the struct members to fill the holes could be a little tricky
> and could have side effects because it may make a performance difference
> whether certain members are in one cacheline or not.
> And whether it's worth to spend this effort (incl. the related risks)
> just to save a few bytes (also considering that typically we have quite
> few instances of struct net_device)?
Not really.
In fact we probably should spend time reordering fields for performance,
since some new fields were added a bit randomly, breaking the goal of data locality.
Some fields are used in control path only can could be moved out of the cache lines
needed in data path (fast path).
Powered by blists - more mailing lists