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

> On 7/26/06, Christoph Lameter <clameter@sgi.com> wrote:
> > We intentionally discard the caller mandated alignment for debugging
> > purposes.
>
> Disagreed. The caller mandated alignment is not a hint. It is the
> required minimum alignment for objects.

This has been with the slab for a long time. Lots of alignments are now
ignored for the debugging case without a problem. Manfred intentionally
put that in. Alignments passed to kmem_cache_create are there for
performance reasons and not because unaligned object break the arch code.

> On 7/26/06, Christoph Lameter <clameter@sgi.com> wrote:
> > And it changes the basic way that slab debugging works.
>
> Look at kmem_cache_create, we turn off debugging for both caller and
> architecture mandated alignments already and the only reason we are
> not doing it for Heiko is because the architecture recommended default
> alignment is so large.

We discard alignment for FORCED_DEBUG unless

1. object size > 4096

2. If the object size would increase unreasonably.

I simply added another case. That preseves the discarding of alignment for
the FORCED_DEBUG case but allows an override if operations would be
impossible for not correctly aligned objects for certain caches (like in
the S/390 case).
-
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 18:27    [W:0.052 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site