![]() | |||||||||||||
Messages in this thread |
Mike Kravetz <kravetz@us.ibm.com> wrote:
>
> There are a few places that check the system_state variable to
> determine if they should use the bootmem or kmalloc allocator.
> However, this is not accurate as system_state transitions from
> 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);
}
?
-
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 07:55 [from the cache] ©2003-2008 | |||||||||||||