Messages in this thread | | | Date | Thu, 27 Mar 2008 15:23:49 -0700 | From | Jeremy Fitzhardinge <> | Subject | Re: Trying to make use of hotplug memory for xen balloon driver |
| |
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
| |