linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christian Krafft <krafft@de.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 1/2] fix call to alloc_bootmem after bootmem has been freed
Date: Tue, 21 Nov 2006 19:02:13 +0100	[thread overview]
Message-ID: <20061121190213.1700761b@localhost> (raw)
In-Reply-To: <20061121085535.9c62b54f.akpm@osdl.org>

On Tue, 21 Nov 2006 08:55:35 -0800
Andrew Morton <akpm@osdl.org> wrote:

> On Wed, 15 Nov 2006 19:32:38 +0100
> Christian Krafft <krafft@de.ibm.com> wrote:
> 
> > In some cases it might happen, that alloc_bootmem is beeing called
> > after bootmem pages have been freed. This is, because the condition
> > SYSTEM_BOOTING is still true after bootmem has been freed.
> >
> > Signed-off-by: Christian Krafft <krafft@de.ibm.com>
> >
> > Index: linux/mm/page_alloc.c
> > ===================================================================
> > --- linux.orig/mm/page_alloc.c
> > +++ linux/mm/page_alloc.c
> > @@ -1931,7 +1931,7 @@ int zone_wait_table_init(struct zone *zo
> >  	alloc_size = zone->wait_table_hash_nr_entries
> >  					* sizeof(wait_queue_head_t);
> >
> > - 	if (system_state == SYSTEM_BOOTING) {
> > +	if (!slab_is_available()) {
> >  		zone->wait_table = (wait_queue_head_t *)
> >  			alloc_bootmem_node(pgdat, alloc_size);
> >  	} else {
> 
> I don't think that slab_is_available() is an appropriate way of working out
> if we can call vmalloc().

Afaik slab_is_available() is the generic replacement for mem_init_done, which exists only on powerpc. 
If thats not appropriate, I dont know why. However, SYSTEM_BOOTING is definitively wrong.
 
> Also, a more complete description of the problem is needed, please.  Which
> caller is incorrectly allocating bootmem?
> 

spu_base is causing the call to alloc_bootmem but only, if built into kernel. Other components might have the same problem.

cheers,
ck

-- 
Mit freundlichen Grussen,
kind regards,

Christian Krafft
IBM Systems & Technology Group, 
Linux Kernel Development
IT Specialist

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-11-21 18:02 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-15 18:30 [patch 0/2] fix bugs while booting on NUMA system where some nodes have no mem Christian Krafft
2006-11-15 18:32 ` [patch 1/2] fix call to alloc_bootmem after bootmem has been freed Christian Krafft
2006-11-21 16:55   ` Andrew Morton
2006-11-21 18:02     ` Christian Krafft [this message]
2006-11-21 18:26       ` Andrew Morton
2006-11-22  9:23         ` Arnd Bergmann
2006-11-15 18:34 ` [patch 2/2] enables booting a NUMA system where some nodes have no memory Christian Krafft
2006-11-15 21:24   ` Christoph Lameter
2006-11-15 21:58     ` Jack Steiner
2006-11-15 22:40       ` Christoph Lameter
2006-11-15 22:43         ` Martin Bligh
2006-11-15 22:52           ` Christoph Lameter
2006-11-16  0:54             ` KAMEZAWA Hiroyuki
2006-11-16  0:57               ` Christoph Lameter
2006-11-16  1:17                 ` KAMEZAWA Hiroyuki
2006-11-16 15:40                 ` Christian Krafft
2006-11-16 15:49                   ` Martin J. Bligh
2006-11-16 18:46                   ` Christoph Lameter
2006-11-16  2:01             ` Martin Bligh
2006-11-16  1:35         ` Jack Steiner
2006-11-16  1:57           ` Christoph Lameter
2006-11-16  2:09             ` Martin Bligh
2006-11-16  2:35               ` Christoph Lameter
2006-11-16  3:28             ` Jack Steiner
2006-11-15 22:05     ` Martin Bligh
2006-11-15 22:41       ` Christoph Lameter
2006-11-15 22:46         ` Martin Bligh
2006-11-15 22:51           ` Christoph Lameter
2006-11-16  0:59             ` KAMEZAWA Hiroyuki
2006-11-16  1:22               ` Yasunori Goto
2006-11-16  0:26         ` Arnd Bergmann
2006-11-16  0:45           ` Christoph Lameter
2006-11-16 13:08             ` Arnd Bergmann
2006-11-16  0:44         ` Jesper Juhl
2006-11-16  0:46           ` Christoph Lameter
2006-11-16 15:21         ` Lee Schermerhorn

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=20061121190213.1700761b@localhost \
    --to=krafft@de.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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