Messages in this thread |  | | Subject | Re: [PATCH RFC] hotplug-memory: refactor online_pages to separate zone growth from page onlining | | From | Dave Hansen <> | | Date | Sat, 29 Mar 2008 09:06:14 -0700 |
| |
On Fri, 2008-03-28 at 19:08 -0700, Jeremy Fitzhardinge wrote: > My big remaining problem is how to disable the sysfs interface for this > memory. I need to prevent any onlining via /sys/device/system/memory.
I've been thinking about this some more, and I wish that you wouldn't just throw this interface away or completely disable it. It actually does *exactly* what you want in a way. :)
When the /memoryXX/ directory appears, that means that the hardware has found the memory, and that the 'struct page' is allocated and ready to be initialized.
When the OS actually wants to use the memory (initialize the 'struct page', and free_page() it), it does the 'echo online > /sys...'. Both the 'struct page' and the memory represented by it are untouched until the "online". This was originally in place to avoid fragmenting it immediately in the case that the system did not need it.
To me, it sounds like the only different thing that you want is to make sure that only partial sections are onlined. So, shall we work with the existing interfaces to online partial sections, or will we just disable it entirely when we see Xen?
For Xen and KVM, how does it get decided that the guest needs more memory? Is this guest or host driven? Both? How is the guest notified? Is guest userspace involved at all?
-- Dave
|  |