lkml.org 
[lkml]   [2008]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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


\
 
 \ /
  Last update: 2008-03-27 23:27    [W:0.079 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site