From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: [PATCH net-next] net: align gnet_stats_basic_cpu struct Date: Fri, 16 Nov 2018 07:43:29 -0800 Message-ID: <20181116154329.247947-1-edumazet@google.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: netdev , Eric Dumazet , Eric Dumazet To: "David S . Miller" Return-path: Received: from mail-pf1-f195.google.com ([209.85.210.195]:37528 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728124AbeKQB4Z (ORCPT ); Fri, 16 Nov 2018 20:56:25 -0500 Received: by mail-pf1-f195.google.com with SMTP id u3-v6so8903870pfm.4 for ; Fri, 16 Nov 2018 07:43:33 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: 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 --- include/net/gen_stats.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index 946bd53a9f81dff5946579514360a9e5eaf3489b..ca23860adbb956fcfff3605068fdedf59073ce1a 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; -- 2.19.1.1215.g8438c0b245-goog