[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060723073500.GA10556@osiris.ibm.com>
Date: Sun, 23 Jul 2006 09:35:00 +0200
From: Heiko Carstens <heiko.carstens@...ibm.com>
To: Christoph Lameter <clameter@....com>
Cc: Andrew Morton <akpm@...l.org>, linux-kernel@...r.kernel.org,
Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [patch] slab: always follow arch requested alignments
On Sat, Jul 22, 2006 at 12:42:32PM -0700, Christoph Lameter wrote:
> On Sat, 22 Jul 2006, Heiko Carstens wrote:
> > Since that didn't work I thought why not set ARCH_SLAB_MINALIGN to 8, since
> > that would (according to the description) guarantee that _all_ caches would
> > have an 8 byte alignment. But that didn't work too.
>
> Why did that not work
>
> See kmem_cache_create():
> /* 2) arch mandated alignment: disables debug if necessary */
> if (ralign < ARCH_SLAB_MINALIGN) {
> ralign = ARCH_SLAB_MINALIGN;
> if (ralign > BYTES_PER_WORD)
> flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER);
> }
That is because if kmem_cache_create gets called with SLAB_HWCACHE_ALIGN set
in flags then ralign will be greater or equal to ARCH_SLAB_MINALIGN:
/* 1) arch recommendation: can be overridden for debug */
if (flags & SLAB_HWCACHE_ALIGN) {
[...]
ralign = cache_line_size();
[...]
Therefore the test above will be passed and SLAB_RED_ZONE and SLAB_STORE_USER
will stay in flags.
cache_line_size() will return 256 on s390.
-
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