Re: [PATCH] alloc_memory_early() routines
From: Andi Kleen
Date: Wed May 10 2006 - 04:28:54 EST
Pekka J Enberg <penberg@xxxxxxxxxxxxxx> writes:
> On Wed, 10 May 2006, Pekka Enberg wrote:
> > > > +void * __init alloc_memory_early_node(size_t size, gfp_t flags, int node)
> > > > +{
> > > > + if (g_cpucache_up == FULL)
> > > > + return kmalloc_node(size, flags, node);
> > > > + else
> > > > + return alloc_bootmem_node(NODE_DATA(node), size);
> > > > +}
> > >
> > > I'd prefer you put this in mm/bootmem.c and added a
> > >
> > > int slab_is_available(void)
> > > {
> > > return g_cpucache_up == FULL;
> > > }
> > >
> > > to mm/slab.c instead.
>
> On Wed, 10 May 2006, Christoph Lameter wrote:
> > Does slab not available mean that bootmem can be used?
>
> Yes.
Actually it doesn't - in early boot up there is a phase where even bootmem
doesn't work yet.
-Andi
-
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/