linux: Slightly improve single-page contiguous region creation/destruction
PATCH 1/1 linux: Slightly improve single-page contiguous region creation/destruction
Combine TLB flush with page table update, avoiding an extra hypercall. Especially on 32-bit PAE single page requests are quite frequent.
Signed-off-by [email protected]
linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c +6 -4
@@ -350,12 +350,13 @@ int xen_create_contiguous_region(if (HYPERVISOR_update_va_mapping (vstart + (i*PAGE_SIZE ),pfn_pte_ma (frame,PAGE_KERNEL ), -0 )) + order ?0 :UVMF_INVLPG |UVMF_ALL ))BUG ();set_phys_to_machine ((__pa (vstart)>>PAGE_SHIFT )+i, frame); } -flush_tlb_all (); +if (order) +flush_tlb_all ();if (success) contiguous_bitmap_set(__pa(vstart) >> PAGE_SHIFT,
@@ -439,12 +440,13 @@ void xen_destroy_contiguous_region(unsigif (HYPERVISOR_update_va_mapping (vstart + (i*PAGE_SIZE ),pfn_pte_ma (frame,PAGE_KERNEL ), -0 )) + order ?0 :UVMF_INVLPG |UVMF_ALL ))BUG ();set_phys_to_machine ((__pa (vstart)>>PAGE_SHIFT )+i, frame); } -flush_tlb_all (); +if (order) +flush_tlb_all ();balloon_unlock (flags);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 4 lines · Jan Beulich
Combine TLB flush with page table update, avoiding an extra hypercall. Especially on 32-bit PAE single page requests are quite frequent.
Signed-off-by [email protected]
Only on old Xen -- xen-unstable supports pgdirs above 4gb. So it's unclear this is a worthwhile optimisation there.
-- Keir