From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
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: Thu, 27 Mar 2008 15:23:49 -0700 [thread overview]
Message-ID: <47EC1E75.6090102@goop.org> (raw)
In-Reply-To: <1206577595.7883.26.camel@nimitz.home.sr71.net>
Dave Hansen wrote:
> The flags being all null looks highly suspicious to me.
>
> Once you've done an add_memory(), the new sections should show up
> in /sys. Do you see them in there?
>
> Once they show up, you can online them with:
>
> echo online > /sys/devices/system/memory/memoryXXX/state
>
> That's what actually goes and mucks with the 'struct zone's and the
> pgdats to expand them. It will also call online_page() on the whole
> range. I think you're trying to do this manually, and missing part of
> it.
Hm, actually this is precisely the wrong thing to do in this case. When
the balloon driver adds a new section of hotplug memory, its doing it to
get the page structures, but there's no actual memory backing those
pages. The memory only comes into existence on a page-by-page basis
when the balloon driver gets memory from the hypervisor and attaches it
to each page (the balloon driver uses online_page() on each page as its
ready).
If the user does a mass online via /sys the system explodes because it
onlines a large number of pages which have no backing memory. Since
none of those pages can be mapped, the kernel explodes in a variety of
interesting ways.
So I'd really like to inhibit the sysfs interface on these sections.
Thoughts?
Thanks,
J
next prev parent reply other threads:[~2008-03-27 22:24 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 [this message]
2008-03-28 18:21 ` Dave Hansen
2008-03-27 0:50 ` KAMEZAWA Hiroyuki
2008-03-27 5:57 ` Jeremy Fitzhardinge
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=47EC1E75.6090102@goop.org \
--to=jeremy@goop.org \
--cc=anthony@codemonkey.ws \
--cc=chrisw@sous-sol.org \
--cc=clameter@sgi.com \
--cc=dave@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox