On Wed, 2008-04-02 at 11:52 -0700, Jeremy Fitzhardinge wrote:
Why don't we just have hotplug work that way? When we want to take aIt also requires you actually have the memory on hand to populate the whole area. 512MB is still a significant chunk on a 2GB server; you may end up generating significant overall system memory pressure to scrape together the memory, only to immediately discard it again.
guest from 1GB to 1GB+1 page (or whatever), we just hotplug the entire
section (512MB or 1GB or whatever), actually online the whole thing,
then make the balloon driver take it back to where it *should* be. That
way we're completely reusing existing components that have do be able to
handle this case anyway.
Yeah, this is suboptimal, an it has a possibility of fragmenting the
memory, but it will only be used for the x86-32 case.
That's a very good point. Can we make it so that the hypervisors don't
actually allocate the memory to the guest until its first touch? If the
pages are on the freelist, their *contents* shouldn't be touched at all
during the onlining process.