![]() | |||||||||||||
Messages in this thread |
On Mon, 8 May 2006, Andrew Morton wrote:
> > SYSTEM_BOOTING to SYSTEM_RUNNING well after the bootmem allocator
> > is no longer usable. Introduce the SYSTEM_BOOTING_KMALLOC_AVAIL
> > state which indicates the kmalloc allocator is available for use.
>
> Let's not do this - system_state is getting out of control.
>
> How about some private boolean in slab.c, and some special allocation
> function like
>
> void __init *alloc_memory_early(size_t size, gfp_t gfp_flags)
> {
> if (slab_is_available)
> return kmalloc(size, gfp_flags);
> return alloc_bootmem(size);
> }
You may use g_cpucache_up to check the state of the slab allocator.
-
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-05-09 08:03 [from the cache] ©2003-2008 | |||||||||||||