Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756941AbYCCURY (ORCPT ); Mon, 3 Mar 2008 15:17:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751540AbYCCURH (ORCPT ); Mon, 3 Mar 2008 15:17:07 -0500 Received: from cantor2.suse.de ([195.135.220.15]:57783 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751369AbYCCURC (ORCPT ); Mon, 3 Mar 2008 15:17:02 -0500 Date: Mon, 3 Mar 2008 21:17:01 +0100 From: Nick Piggin To: Christoph Lameter Cc: netdev@vger.kernel.org, Linux Kernel Mailing List , yanmin_zhang@linux.intel.com, David Miller , Eric Dumazet Subject: Re: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment Message-ID: <20080303201701.GF8974@wotan.suse.de> References: <20080303093449.GA15091@wotan.suse.de> <20080303200613.GC8974@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1263 Lines: 26 On Mon, Mar 03, 2008 at 12:10:59PM -0800, Christoph Lameter wrote: > On Mon, 3 Mar 2008, Nick Piggin wrote: > > > > If they are already not cache line aligned then we can make them as > > > dense as possible. That is what SLUB does. > > > > Because when you specify HWCACHE_ALIGN, it means that you want the object > > not to cross cacheline boundaries for at least cache_line_size() bytes. > > SLAB does this. SLUB does not without this patch. > > HWCACHE_ALIGN means that you want the object to be aligned at > cacheline boundaries for optimization. Why does crossing cacheline > boundaries matter in this case? No, HWCACHE_ALIGN means that you want the object not to cross cacheline boundaries for at least cache_line_size() bytes. You invented new semantics with SLUB, but all the callers were written expecting the existing semantics, presumably. So we should retain that behaviour, and if you disagree with the actual callers, then that is fine but you should discuss each case with the relevant people. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/