netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org,
	roopa@cumulusnetworks.com
Subject: Re: [PATCH net-next] neighbor: Add protocol attribute
Date: Tue, 11 Dec 2018 08:22:04 -0700	[thread overview]
Message-ID: <1acd4550-997f-cca9-3062-8fd91d92beff@gmail.com> (raw)
In-Reply-To: <20181210.215937.1179843388675835344.davem@davemloft.net>

On 12/10/18 10:59 PM, David Miller wrote:
> From: David Ahern <dsahern@gmail.com>
> Date: Mon, 10 Dec 2018 19:47:33 -0700
> 
>> On 12/7/18 4:45 PM, David Miller wrote:
>>>
>>> Right, neigh->ha[] should probably be kept 8-byte aligned.
>>>
>>
>> From what I can see ha is only used with memcpy, and neighbour struct is
>> annotated with __randomize_layout. Are you saying that ha should be
>> marked with __aligned(8)?
> 
> People who care about performance probably don't build with randomization
> enabled, do they?
> 
> Even though it uses memcpy() it will be faster if it is 8 byte aligned
> and we can probably explicitly take advantage of that alignment even
> more if we add the marking as you suggest perhaps.
> 
> Given all of this, what is your opinion?
> 

Arguably my take is ethernet centric. I do not see how 8-byte alignment
matters when copying 6 bytes. In my response to Eric I showed ha is
still 4-byte aligned and does not straddle cachelines. Those seem the
more relevant to me.

  reply	other threads:[~2018-12-11 15:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07 21:49 [PATCH net-next] neighbor: Add protocol attribute David Ahern
2018-12-07 22:20 ` Eric Dumazet
2018-12-07 22:24   ` David Ahern
2018-12-07 23:03     ` Eric Dumazet
2018-12-07 23:45       ` David Miller
2018-12-11  2:47         ` David Ahern
2018-12-11  5:59           ` David Miller
2018-12-11 15:22             ` David Ahern [this message]
2018-12-14 22:38               ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2018-12-15 22:09 David Ahern
2018-12-16 20:15 ` David Miller

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=1acd4550-997f-cca9-3062-8fd91d92beff@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    /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).