Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP

From: Nick Piggin
Date: Mon Mar 03 2008 - 15:10:38 EST


On Mon, Mar 03, 2008 at 11:09:51AM -0800, Christoph Lameter wrote:
> On Mon, 3 Mar 2008, Pekka Enberg wrote:
>
> > At least historically SLAB_HWCACHE_ALIGN has been just a hint,
> > although slab tries very hard to satisfy it (see the comments in
> > mm/slab.c). Why do we need stronger guarantees than that, btw?
>
> Its a hint. Alignment is specified as a parameter to kmem_cache_create not
> as a flag. Maybe we could remove SLAB_HWCACHE_ALIGN because it is causing
> so much confusion?

Yeah, that's what I thought too, when I got confused by these new
SLUB semantics that you made up. Actually if you look at SLAB,
it has very precise and rational semantics. SLUB should respect that.

If you really configure for tiny memory footprint, then I'm fine with
it going away. In that respect, it is still a hint (the callers can't
rely on it being a particular alignment), and that also applies for
SLAB_SMP_ALIGN, in case you are concerned that flags must only be hints.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/