Re: [PATCH RFC] hotplug-memory: refactor online_pages to separatezone growth from page onlining

From: Jeremy Fitzhardinge
Date: Wed Apr 02 2008 - 14:53:20 EST


Dave Hansen wrote:
and a flat sparsemem map, you're only looking at
~500k of overhead for the sparsemem storage. Less if you use vmemmap.
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.

Yeah, I forgot that we didn't have vmemmap on x86-32. Ugh.

OK, here's another idea: Xen (and the balloon driver) already handle a
case where a guest boots up with 2GB of memory but only needs 1GB,
right? It will balloon the guest down to 1GB from 2GB.

Right.

Why don't we just have hotplug work that way? When we want to take a
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.

It 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.

J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/