[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060728062028.GA9559@osiris.boeblingen.de.ibm.com>
Date: Fri, 28 Jul 2006 08:20:28 +0200
From: Heiko Carstens <heiko.carstens@...ibm.com>
To: Christoph Lameter <clameter@....com>
Cc: Pekka J Enberg <penberg@...helsinki.fi>, akpm@...l.org,
manfred@...orfullife.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] slab: respect architecture and caller mandated alignment
On Thu, Jul 27, 2006 at 07:25:56PM -0700, Christoph Lameter wrote:
> On Thu, 27 Jul 2006, Pekka J Enberg wrote:
>
> > As explained by Heiko, on s390 (32-bit) ARCH_KMALLOC_MINALIGN is set to eight
> > because their common I/O layer allocates data structures that need to have an
> > eight byte alignment. This does not work when CONFIG_SLAB_DEBUG is enabled
> > because kmem_cache_create will override alignment to BYTES_PER_WORD which is
> > four.
> >
> > So change kmem_cache_create to ensure cache alignment is always at minimum
> > what the architecture or caller mandates even if slab debugging is enabled.
>
> Note that this will disable SLAB_RED_ZONE and SLAB_STORE_USER
> for the following SLAB_DEBUG cases:
>
> 1. For all slabs if an arch sets ARCH_SLAB_MINALIGN > BYTES_PER_WORD
> [...]
> 2. For all general (kmalloc) slabs if an arch sets
> ARCH_KMALLOC_MINALIGN > BYTES_PER_WORD
> [...]
> F.e. S/390 will not be able to use slab debug for the general slabs.
>
> You may want to document that change somewhere.
It is already documented (see top of slab.c). The only thing that was wrong was
that ARCH_SLAB_MINALIGN and ARCH_KMALLOC_MINALIGN didn't have the effect like
one would expect from the documentation.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists