The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Pekka J Enberg <penberg@cs.Helsinki.FI>
Cc: Mike Kravetz <kravetz@us.ibm.com>, Andrew Morton <akpm@osdl.org>,
	Dave Hansen <haveblue@us.ibm.com>,
	Andy Whitcroft <apw@shadowen.org>,
	linux-kernel@vger.kernel.org, clameter@sgi.com
Subject: Re: [PATCH] alloc_memory_early() routines
Date: 10 May 2006 10:29:14 +0200	[thread overview]
Message-ID: <p731wv28eqt.fsf@bragg.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0605101015190.12536@sbz-30.cs.Helsinki.FI>

Pekka J Enberg <penberg@cs.Helsinki.FI> 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

  reply	other threads:[~2006-05-10  8:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-09  5:35 Add SYSTEM_BOOTING_KMALLOC_AVAIL system_state Mike Kravetz
2006-05-09  5:49 ` Andrew Morton
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 [this message]
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=p731wv28eqt.fsf@bragg.suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=apw@shadowen.org \
    --cc=clameter@sgi.com \
    --cc=haveblue@us.ibm.com \
    --cc=kravetz@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.Helsinki.FI \
    /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