Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752916AbdHBKxe (ORCPT ); Wed, 2 Aug 2017 06:53:34 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:54434 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752521AbdHBKxd (ORCPT ); Wed, 2 Aug 2017 06:53:33 -0400 Date: Wed, 2 Aug 2017 12:53:21 +0200 From: Peter Zijlstra To: Eric Dumazet Cc: "Huang, Ying" , linux-kernel@vger.kernel.org, Ingo Molnar , Michael Ellerman , Borislav Petkov , Thomas Gleixner , Juergen Gross , Aaron Lu Subject: Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data Message-ID: <20170802105321.3dettvyq4vmcvfth@hirez.programming.kicks-ass.net> References: <20170802085220.4315-1-ying.huang@intel.com> <20170802085220.4315-4-ying.huang@intel.com> <1501669138.25002.20.camel@edumazet-glaptop3.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1501669138.25002.20.camel@edumazet-glaptop3.roam.corp.google.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 606 Lines: 18 On Wed, Aug 02, 2017 at 03:18:58AM -0700, Eric Dumazet wrote: > What we can do instead is to force an alignment on 4*sizeof(void *). > (32 bytes on 64bit, 16 bytes on 32bit arches) > > Maybe something like this : > > diff --git a/include/linux/smp.h b/include/linux/smp.h > index 68123c1fe54918c051292eb5ba3427df09f31c2f..f7072bf173c5456e38e958d6af85a4793bced96e 100644 > --- a/include/linux/smp.h > +++ b/include/linux/smp.h > @@ -19,7 +19,7 @@ struct call_single_data { > smp_call_func_t func; > void *info; > unsigned int flags; > -}; > +} __attribute__((aligned(4 * sizeof(void *)))); Agreed.