From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Westphal Subject: Re: [PATCH 06/26] netfilter: conntrack: align nf_conn on cacheline boundary Date: Wed, 6 Jul 2016 17:01:25 +0200 Message-ID: <20160706150125.GC2243@breakpoint.cc> References: <1467815048-2240-1-git-send-email-pablo@netfilter.org> <1467815048-2240-7-git-send-email-pablo@netfilter.org> <063D6719AE5E284EB5DD2968C1650D6D5F4F18C1@AcuExch.aculab.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: 'Pablo Neira Ayuso' , "netfilter-devel@vger.kernel.org" , "davem@davemloft.net" , "netdev@vger.kernel.org" To: David Laight Return-path: Received: from Chamillionaire.breakpoint.cc ([80.244.247.6]:58642 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754174AbcGFPBf (ORCPT ); Wed, 6 Jul 2016 11:01:35 -0400 Content-Disposition: inline In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D5F4F18C1@AcuExch.aculab.com> Sender: netfilter-devel-owner@vger.kernel.org List-ID: David Laight wrote: > From: Pablo Neira Ayuso > > Sent: 06 July 2016 15:24 > > From: Florian Westphal > > > > increases struct size by 32 bytes (288 -> 320), but it is the right thing, > > else any attempt to (re-)arrange nf_conn members by cacheline won't work. > ... > > nf_conntrack_cachep = kmem_cache_create("nf_conntrack", > > sizeof(struct nf_conn), 0, > > - SLAB_DESTROY_BY_RCU, NULL); > > + SLAB_DESTROY_BY_RCU | SLAB_HWCACHE_ALIGN, NULL); > > What happens on systems with cache lines that are longer than 64 bytes? Sorry, I don't have a secret decoder ring. HWCACHE_ALIGN is used for several other net slab caches, including skbuff, so why is this a problem here?