WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Avoid some unnecessary TLB flushes. This will probably m

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Avoid some unnecessary TLB flushes. This will probably make no real
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Jul 2005 08:46:09 -0400
Delivery-date: Fri, 15 Jul 2005 12:46:32 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User sos22@xxxxxxxxxxxxxxxxxxxx
# Node ID ebfde26a769a123dcb3b19ab03881a02ee2404fc
# Parent  e8b48f3a2843e79680147926fbe4ba94cce68589

Avoid some unnecessary TLB flushes.  This will probably make no real
difference on any sensible guest operating system.

Signed-off-by: Steven Smith, sos22@xxxxxxxxxxxxx

diff -r e8b48f3a2843 -r ebfde26a769a xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Fri Jul 15 09:09:57 2005
+++ b/xen/arch/x86/mm.c Fri Jul 15 09:24:29 2005
@@ -1352,18 +1352,22 @@
         {
             if ( (x & (PGT_type_mask|PGT_va_mask)) != type )
             {
-                /*
-                 * On type change we check to flush stale TLB entries. This 
-                 * may be unnecessary (e.g., page was GDT/LDT) but those
-                 * circumstances should be very rare.
-                 */
-                cpumask_t mask = page_get_owner(page)->cpumask;
-                tlbflush_filter(mask, page->tlbflush_timestamp);
-
-                if ( unlikely(!cpus_empty(mask)) )
+                if ( (x & PGT_type_mask) != (type & PGT_type_mask) )
                 {
-                    perfc_incrc(need_flush_tlb_flush);
-                    flush_tlb_mask(mask);
+                    /*
+                     * On type change we check to flush stale TLB
+                     * entries. This may be unnecessary (e.g., page
+                     * was GDT/LDT) but those circumstances should be
+                     * very rare.
+                     */
+                    cpumask_t mask = page_get_owner(page)->cpumask;
+                    tlbflush_filter(mask, page->tlbflush_timestamp);
+
+                    if ( unlikely(!cpus_empty(mask)) )
+                    {
+                        perfc_incrc(need_flush_tlb_flush);
+                        flush_tlb_mask(mask);
+                    }
                 }
 
                 /* We lose existing type, back pointer, and validity. */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Avoid some unnecessary TLB flushes. This will probably make no real, Xen patchbot -unstable <=