netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Heiner Kallweit <hkallweit1@gmail.com>,
	David Ahern <dsahern@gmail.com>,
	David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	David Laight <David.Laight@ACULAB.COM>
Subject: Re: [PATCH net-next v2] net: core: change bool members of struct net_device to bitfield members
Date: Tue, 9 Oct 2018 13:52:22 -0700	[thread overview]
Message-ID: <a7286ffb-0de5-bb9c-7dc4-7d88d952bb2f@gmail.com> (raw)
In-Reply-To: <ded0a778-ca20-4e0f-223d-da3eb5cd71b2@gmail.com>



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

  parent reply	other threads:[~2018-10-10  4:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08 20:17 [PATCH net-next v2] net: core: change bool members of struct net_device to bitfield members Heiner Kallweit
2018-10-09 15:20 ` David Ahern
2018-10-09 20:24   ` Heiner Kallweit
2018-10-09 20:43     ` David Ahern
2018-10-09 20:52     ` Eric Dumazet [this message]
2018-10-10  8:59       ` David Laight

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a7286ffb-0de5-bb9c-7dc4-7d88d952bb2f@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).