From: Eric Dumazet Date: Fri, 16 Nov 2018 15:43:29 +0000 (-0800) Subject: net: align gnet_stats_basic_cpu struct X-Git-Tag: v5.0-rc1~129^2~267 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=001c96db0181263740215a7f5fec7e937b800a94;p=thirdparty%2Fkernel%2Flinux.git net: align gnet_stats_basic_cpu struct This structure is small (12 or 16 bytes depending on 64bit or 32bit kernels), but we do not want it spanning two cache lines. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index 946bd53a9f81d..ca23860adbb95 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h @@ -10,7 +10,7 @@ struct gnet_stats_basic_cpu { struct gnet_stats_basic_packed bstats; struct u64_stats_sync syncp; -}; +} __aligned(2 * sizeof(u64)); struct net_rate_estimator;