From: Andrew Morton <akpm@osdl.org>
To: Mike Kravetz <kravetz@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Add SYSTEM_BOOTING_KMALLOC_AVAIL system_state
Date: Mon, 8 May 2006 22:49:52 -0700 [thread overview]
Message-ID: <20060508224952.0b43d0fd.akpm@osdl.org> (raw)
In-Reply-To: <20060509053512.GA20073@monkey.ibm.com>
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);
}
?
next prev parent reply other threads:[~2006-05-09 5:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-09 5:35 Mike Kravetz
2006-05-09 5:49 ` Andrew Morton [this message]
2006-05-09 6:01 ` Christoph Lameter
2006-05-09 17:20 ` Dave Hansen
2006-05-09 17:48 ` Mike Kravetz
2006-05-09 21:07 ` [PATCH] alloc_memory_early() routines Mike Kravetz
2006-05-10 7:09 ` Pekka Enberg
2006-05-10 7:11 ` Christoph Lameter
2006-05-10 7:16 ` Pekka J Enberg
2006-05-10 8:29 ` Andi Kleen
2006-05-10 16:16 ` Mike Kravetz
2006-05-10 17:42 ` Pekka J Enberg
2006-05-10 7:19 ` Pekka Enberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060508224952.0b43d0fd.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=kravetz@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®