From: "Jan Beulich" Subject: [PATCH] linux: Slightly improve single-page contiguous region creation/destruction Date: Thu, 29 Jun 2006 15:47:21 +0200 Message-ID: <44A3F609.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartAF8A45F9.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartAF8A45F9.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline 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: jbeulich@novell.com --=__PartAF8A45F9.0__= Content-Type: text/plain; name="xenlinux-ccr-dcr-tlb-flush.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xenlinux-ccr-dcr-tlb-flush.patch" Index: 2006-06-29/linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c =================================================================== --- 2006-06-29.orig/linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c 2006-06-29 15:32:35.000000000 +0200 +++ 2006-06-29/linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c 2006-06-29 15:33:10.000000000 +0200 @@ -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(unsig 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(); balloon_unlock(flags); --=__PartAF8A45F9.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__PartAF8A45F9.0__=--