[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 1/2] xen/balloon: set a mapping for ballooned out pages



On Tue, 2013-07-23 at 18:27 +0100, Stefano Stabellini wrote:
> +static int __cpuinit balloon_cpu_notify(struct notifier_block *self,
> +                                 unsigned long action, void *hcpu)
> +{
> +     int cpu = (long)hcpu;
> +     switch (action) {
> +     case CPU_UP_PREPARE:
> +             if (per_cpu(balloon_scratch_page, cpu) != NULL)
> +                     break;

Thinking about this a bit more -- do we know what happens to the per-cpu
area for a CPU which is unplugged and then reintroduced? Is it preserved
or is it reset?

If it is reset then this gets more complicated :-( We might be able to
use the core mm page reference count, so that when the last reference is
removed the page is automatically reclaimed. We can obviously take a
reference whenever we add a mapping of the trade page, but I'm not sure
we are always on the path which removes such mappings... Even then you
could waste pages for some potentially large amount of time each time
you replug a VCPU.

Urg, I really hope the per-cpu area is preserved!

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.