[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1acd4550-997f-cca9-3062-8fd91d92beff@gmail.com>
Date: Tue, 11 Dec 2018 08:22:04 -0700
From: David Ahern <dsahern@...il.com>
To: David Miller <davem@...emloft.net>
Cc: eric.dumazet@...il.com, netdev@...r.kernel.org,
roopa@...ulusnetworks.com
Subject: Re: [PATCH net-next] neighbor: Add protocol attribute
On 12/10/18 10:59 PM, David Miller wrote:
> From: David Ahern <dsahern@...il.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.
Powered by blists - more mailing lists