login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
May
»
21
Re: [PATCH] memory hotplug: fix early allocation handling
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Yasunori Goto <y-goto@...>
To: Heiko Carstens <heiko.carstens@...>
Cc: Andrew Morton <akpm@...>, Andy Whitcroft <apw@...>, Dave Hansen <haveblue@...>, Gerald Schaefer <gerald.schaefer@...>, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...>, <linux-mm@...>, <linux-kernel@...>
Subject:
Re: [PATCH] memory hotplug: fix early allocation handling
Date: Wednesday, May 21, 2008 - 3:29 am
Looks good to me. Thanks. Acked-by: Yasunori Goto <y-goto@jp.fujitsu.com>
quoted text
> From: Heiko Carstens <heiko.carstens@de.ibm.com> > > Trying to add memory via add_memory() from within an initcall function > results in > > bootmem alloc of 163840 bytes failed! > Kernel panic - not syncing: Out of memory > > This is caused by zone_wait_table_init() which uses system_state to > decide if it should use the bootmem allocator or not. > When initcalls are handled the system_state is still SYSTEM_BOOTING > but the bootmem allocator doesn't work anymore. So the allocation > will fail. > > To fix this use slab_is_available() instead as indicator like we do > it everywhere else. > > Cc: Andy Whitcroft <apw@shadowen.org> > Cc: Dave Hansen <haveblue@us.ibm.com> > Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com> > Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > Cc: Yasunori Goto <y-goto@jp.fujitsu.com> > Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> > --- > mm/page_alloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux-2.6/mm/page_alloc.c > =================================================================== > --- linux-2.6.orig/mm/page_alloc.c > +++ linux-2.6/mm/page_alloc.c > @@ -2804,7 +2804,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 {
-- Yasunori Goto --
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] memory hotplug: fix early allocation handling
, Heiko Carstens
, (Tue May 20, 6:51 am)
Re: [PATCH] memory hotplug: fix early allocation handling
, Yasunori Goto
, (Wed May 21, 3:29 am)
Re: [PATCH] memory hotplug: fix early allocation handling
, Andy Whitcroft
, (Tue May 20, 10:48 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Alan Cox
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
Jan Engelhardt
intel iommu (Re: -mm merge plans for 2.6.23)
git
:
linux-netdev
:
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
David Miller
Re: [GIT]: Networking
Evgeniy Polyakov
Re: [BUG] New Kernel Bugs
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
675 guests
online.
Online users
Peterkim1
Syndicate