From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161010AbWGZS3D (ORCPT ); Wed, 26 Jul 2006 14:29:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161014AbWGZS3B (ORCPT ); Wed, 26 Jul 2006 14:29:01 -0400 Received: from omx2-ext.sgi.com ([192.48.171.19]:38082 "EHLO omx2.sgi.com") by vger.kernel.org with ESMTP id S1161010AbWGZS3A (ORCPT ); Wed, 26 Jul 2006 14:29:00 -0400 Date: Wed, 26 Jul 2006 11:28:44 -0700 (PDT) From: Christoph Lameter To: Manfred Spraul cc: Pekka Enberg , Heiko Carstens , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [patch] slab: always follow arch requested alignments In-Reply-To: <44C7B352.9020307@colorfullife.com> Message-ID: References: <20060722110601.GA9572@osiris.boeblingen.de.ibm.com> <84144f020607260505s17daa5c8j6e5095eb956828ee@mail.gmail.com> <84144f020607260843i15247ddai7f447f0d9422fec5@mail.gmail.com> <44C7B352.9020307@colorfullife.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 Jul 2006, Manfred Spraul wrote: > There are two different types of alignment: > - SLAB_HWCACHE_ALIGN: it's a recommendation, it's regularly ignored. > - the align parameter, or ARCH_SLAB_MINALIGN: It's mandatory. For example the > pgd structures must be 4 kB aligned, it's required by the hardware. And I > think there was (is?) a structure where ptr & ~(size-1) was used to find the > start of the structure. I agree with the above if there is an issue there then lets fix it. > Thus the patch is correct, it's a bug in the slab allocator. If HWCACHE_ALIGN > is set, then the allocator ignores align or ARCH_SLAB_MINALIGN. But then Heiko does not want to set ARCH_SLAB_MINALIGN at all. This is not the issue we are discussing. In the DEBUG case he wants ARCH_KMALLOC_MINALIGN to be enforced even if ARCH_SLAB_MINALIGN is not set.