From: Jeremy Fitzhardinge <jeremy@goop.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>,
Christoph Lameter <clameter@sgi.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Anthony Liguori <anthony@codemonkey.ws>,
Chris Wright <chrisw@sous-sol.org>
Subject: Re: Trying to make use of hotplug memory for xen balloon driver
Date: Wed, 26 Mar 2008 22:57:57 -0700 [thread overview]
Message-ID: <47EB3765.8020702@goop.org> (raw)
In-Reply-To: <20080327095059.5d2759a3.kamezawa.hiroyu@jp.fujitsu.com>
KAMEZAWA Hiroyuki wrote:
> On Wed, 26 Mar 2008 16:11:54 -0700
> Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>
>
>> Hi,
>>
>> I'm trying to make use of hotplug memory in the Xen balloon driver. If
>> you want to expand a domain to be larger than its initial size, it must
>> add new page structures to describe the new memory.
>>
>> The platform is x86-32, with CONFIG_SPARSEMEM and
>> CONFIG_HOTPLUG_MEMORY. Because the new memory is only pseudo-physical,
>> the physical address within the domain is arbitrary, and I added a
>> add_memory_resource() function so I could use allocate_resource() to
>> find an appropriate address to put the new memory at.
>>
>>
> welcome to chaos of memory hotplug :)
>
>
>> 1. the online_page() raises an error:
>>
>> Bad page state in process 'events/0'
>> page:c16fa0cc flags:0x00000000 mapping:00000000 mapcount:1 count:0
>> Trying to fix it up, but a reboot is needed
>>
>
> Hmm, this seems memmap is not initialized correctly...
> page->flags == 0 means page is in ZONE_DMA.(it's only 16MB range on x86)
> I think memmap is not initilalized.
>
> Calling path to memmap initailization is.
> ==
> add_memory()
> -> arch_add_memory()
> -> __add_page()
> -> __add_section()
> -> __add_zone()
> -> memmap_init_zone()
> ==
> Please check what arch_add_memory() is called, at first.
>
Ah, I see what it is. I wasn't trying to add enough memory. It adds in
units of SECTION_SIZE_BITS, which is 2^30 on 32-bit PAE. When I
increase the initial balloon extension to PAGES_PER_SECTION pages, I
make some more progress:
xen_balloon: Initialising balloon driver.
trying to reserve 262144 pages (1073741824 bytes) for balloon
bootmem alloc of 147456 bytes failed!
Kernel panic - not syncing: Out of memory
Pid: 1, comm: swapper Not tainted 2.6.25-rc7-x86-latest.git-dirty #361
[<c01299dc>] panic+0x49/0x102
[<c0647c3c>] __alloc_bootmem+0x24/0x29
[<c0647c6d>] __alloc_bootmem_node+0x2c/0x34
[<c044bd97>] zone_wait_table_init+0x45/0x95
[<c0467258>] init_currently_empty_zone+0x1d/0xaa
[<c01738ea>] __add_pages+0x88/0xdb
[<c011c1a5>] arch_add_memory+0x25/0x2b
[<c01737a9>] add_memory_resource+0x2f/0x36
[<c064e487>] balloon_init+0x1b8/0x2b9
[<c0635495>] kernel_init+0x137/0x292
[<c063535e>] ? kernel_init+0x0/0x292
[<c063535e>] ? kernel_init+0x0/0x292
[<c0108b67>] kernel_thread_helper+0x7/0x10
=======================
What's the rationale for setting SECTION_SIZE_BITS to 30? Seems like a
fairly large chunk.
J
next prev parent reply other threads:[~2008-03-27 5:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-26 23:11 Trying to make use of hotplug memory for xen balloon driver Jeremy Fitzhardinge
2008-03-27 0:09 ` Dave Hansen
2008-03-27 0:15 ` Jeremy Fitzhardinge
2008-03-27 1:23 ` Christoph Lameter
2008-03-27 0:26 ` Dave Hansen
2008-03-27 22:23 ` Jeremy Fitzhardinge
2008-03-28 18:21 ` Dave Hansen
2008-03-27 0:50 ` KAMEZAWA Hiroyuki
2008-03-27 5:57 ` Jeremy Fitzhardinge [this message]
2008-03-27 6:11 ` KAMEZAWA Hiroyuki
2008-03-27 6:09 ` Jeremy Fitzhardinge
2008-03-27 20:54 ` Jeremy Fitzhardinge
2008-03-28 0:20 ` KAMEZAWA Hiroyuki
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=47EB3765.8020702@goop.org \
--to=jeremy@goop.org \
--cc=anthony@codemonkey.ws \
--cc=chrisw@sous-sol.org \
--cc=clameter@sgi.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=y-goto@jp.fujitsu.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.