Re: [PATCH] VMware Balloon driver

From: Dave Hansen
Date: Tue Apr 06 2010 - 19:21:17 EST


On Mon, 2010-04-05 at 16:28 -0700, Jeremy Fitzhardinge wrote:
> I guess a way to use it in the short term is to have a loop of the form:
>
> while (guest_size> target) {
> shrink_all_memory(guest_size - target); /* force pages to be free */
> while (p = alloc_page(GFP_NORETRY)) /* vacuum up pages */
> release_page_to_hypervisor(p);
> /* twiddle thumbs */
> }

We also need to remember to consolidate the Xen and virtio-balloon
drivers. They both have their own GFP flags, for instance, but I think
they actually want the exact same thing. They could probably also share
that snippet, right?

-- Dave

--
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/