[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Balloon driver: when in autotranslate mode, pages are returned
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID ce48ea86ad72bc8d67214450c5052a3986ff55a9 # Parent 3e5a203c548982a7fdca77aa78ce837a8329f5c4 Balloon driver: when in autotranslate mode, pages are returned to xen without traversing init_mm. This change is needed for xen/ia64 vp model. Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx> diff -r 3e5a203c5489 -r ce48ea86ad72 linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Sun Apr 30 09:39:04 2006 +0100 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Sun Apr 30 09:47:51 2006 +0100 @@ -550,9 +550,22 @@ struct page *balloon_alloc_empty_page_ra scrub_pages(vstart, 1 << order); balloon_lock(flags); - ret = apply_to_page_range(&init_mm, vstart, - PAGE_SIZE << order, dealloc_pte_fn, NULL); - BUG_ON(ret); + if (xen_feature(XENFEAT_auto_translated_physmap)) { + unsigned long gmfn = __pa(vstart) >> PAGE_SHIFT; + struct xen_memory_reservation reservation = { + .nr_extents = 1, + .extent_order = order, + .domid = DOMID_SELF + }; + set_xen_guest_handle(reservation.extent_start, &gmfn); + ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, + &reservation); + BUG_ON(ret != 1); + } else { + ret = apply_to_page_range(&init_mm, vstart, PAGE_SIZE << order, + dealloc_pte_fn, NULL); + BUG_ON(ret); + } current_pages -= 1UL << order; totalram_pages = current_pages; balloon_unlock(flags); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |