lkml.org 
[lkml]   [2006]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] slab: always follow arch requested alignments
Pekka Enberg wrote:

> Hi Christoph,
>
> On 7/26/06, Christoph Lameter <clameter@sgi.com> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-26 20:27    [W:0.075 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site