On Sat, 22 Jul 2006, Heiko Carstens wrote:
> Sorry, I should have mentioned it: on s390 (32 bit) we set
> #define ARCH_KMALLOC_MINALIGN 8.
> This is needed since our common I/O layer allocates data structures that need
> to have an eight byte alignment. Now, if I turn on DEBUG_SLAB, nothing works
> anymore, simply because the slab cache code ignores ARCH_KMALLOC_MINALIGN and
> uses an BYTES_PER_WORD alignment instead, which it shouldn't:
>
> also from mm/slab.c :
>
> #ifndef ARCH_KMALLOC_MINALIGN
> /*
> * Enforce a minimum alignment for the kmalloc caches.
> * Usually, the kmalloc caches are cache_line_size() aligned, except when
> * DEBUG and FORCED_DEBUG are enabled, then they are BYTES_PER_WORD aligned.
> * Some archs want to perform DMA into kmalloc caches and need a guaranteed
> * alignment larger than BYTES_PER_WORD. ARCH_KMALLOC_MINALIGN allows that.
> * Note that this flag disables some debug features.
> */
> #define ARCH_KMALLOC_MINALIGN 0
> #endif
>
> 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);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]