I suppose, but I'm not sure I see the point. What are the benefits of
using this interface? You mentioned that the interface exists so that
its possible to defer using a newly added piece of memory to avoid
fragmentation. I suppose I can see the point of that
But in the xen-balloon case, the memory is added on-demand precisely
when its about to be used, and then onlined in pieces as needed.
Extending the usermode interface to allow partial onlining/offlining
doesn't seem very useful for the case of physical hotplug memory, and
its not at all clear how to do it in a useful way for the xen-balloon
case. Particularly for offlining, since you'd need to guarantee that
any page chosen for offlining isn't currently in use.
Well, there are two ways of looking at it:
either hot-plugging memory immediately adds pages, but they're also
all immediately allocated and therefore unavailable for general use, or
the pages are notionally physically added as they're populated by
the host
In principle they're equivalent, but I could imagine the former has the
potential to make the VM waste time scanning unfreeable pages.
I'm not sure the patches I've posted are doing this stuff correctly
either way.
1MB is too small. It shouldn't be smaller than the size of a large page.
At the moment my concern is 32-bit x86, which doesn't support vmemmap or
sections smaller than 512MB because of the shortage of page flags bits.
J
--