inet: shrink netns_ipv4 by another cache line
authorEric Dumazet <edumazet@google.com>
Wed, 31 Mar 2021 17:52:06 +0000 (10:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Mar 2021 21:48:19 +0000 (14:48 -0700)
commit490f33c4e70431d0a4d01666a6525fdd43299cde
tree4d1b71273ecd5bfc98d03c7e1d56cfc150b0e562
parent1caf8d39c58f3f63193d02928c8dce3fa07cee52
inet: shrink netns_ipv4 by another cache line

By shuffling around some fields to remove 8 bytes of hole,
we can save one cache line.

pahole result before/after the patch :

/* size: 768, cachelines: 12, members: 139 */
/* sum members: 673, holes: 11, sum holes: 39 */
/* padding: 56 */
/* paddings: 2, sum paddings: 7 */
/* forced alignments: 1 */

->

/* size: 704, cachelines: 11, members: 139 */
/* sum members: 673, holes: 10, sum holes: 31 */
/* paddings: 2, sum paddings: 7 */
/* forced alignments: 1 */

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