OSDN Git Service

net: Rearrange dst_entry layout to avoid useless padding.
authorDavid Miller <davem@davemloft.net>
Tue, 28 Nov 2017 20:40:53 +0000 (15:40 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Nov 2017 14:54:27 +0000 (09:54 -0500)
commit8b207e7374c244484d6cb0f0e80ae400ce0ec0cf
tree94c0053f39bcf2acf74b43fdf1a16c3defe8e6ca
parent0f6c480f23f49b53644b383c5554e579498347f3
net: Rearrange dst_entry layout to avoid useless padding.

We have padding to try and align the refcount on a separate cache
line.  But after several simplifications the padding has increased
substantially.

So now it's easy to change the layout to get rid of the padding
entirely.

We group the write-heavy __refcnt and __use with less often used
items such as the rcu_head and the error code.

Signed-off-by: David S. Miller <davem@davemloft.net>
Reviewed-by: Eric Dumazet <edumazet@google.com>
include/net/dst.h