Messages in this thread | | | Subject | Re: [PATCH] VMware Balloon driver | From | Dave Hansen <> | Date | Tue, 06 Apr 2010 16:20:59 -0700 |
| |
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
| |