From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161007AbWGZSYd (ORCPT ); Wed, 26 Jul 2006 14:24:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751749AbWGZSYd (ORCPT ); Wed, 26 Jul 2006 14:24:33 -0400 Received: from dbl.q-ag.de ([213.172.117.3]:27049 "EHLO dbl.q-ag.de") by vger.kernel.org with ESMTP id S1751658AbWGZSYd (ORCPT ); Wed, 26 Jul 2006 14:24:33 -0400 Message-ID: <44C7B352.9020307@colorfullife.com> Date: Wed, 26 Jul 2006 20:24:18 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc5 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pekka Enberg CC: Christoph Lameter , Heiko Carstens , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [patch] slab: always follow arch requested alignments References: <20060722110601.GA9572@osiris.boeblingen.de.ibm.com> <84144f020607260505s17daa5c8j6e5095eb956828ee@mail.gmail.com> <84144f020607260843i15247ddai7f447f0d9422fec5@mail.gmail.com> In-Reply-To: <84144f020607260843i15247ddai7f447f0d9422fec5@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Pekka Enberg wrote: > Hi Christoph, > > On 7/26/06, Christoph Lameter wrote: > >> We intentionally discard the caller mandated alignment for debugging >> purposes. > > 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. 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. -- Manfred