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-devel

[Xen-devel] [PATCH] further shrink the big-lock window

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] further shrink the big-lock window
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 22 Mar 2007 14:21:45 +0000
Delivery-date: Thu, 22 Mar 2007 07:20:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
A few more adjustments to when the 'big' lock is taken/dropped. (The
WARN_ON used here depends on the previously sent patch adding common
support for this construct).

Also, fix a case where the foreign domain setting may not get properly
cleared at the end of a hypercall (in case of an early error).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2007-03-19/xen/arch/x86/mm.c
===================================================================
--- 2007-03-19.orig/xen/arch/x86/mm.c   2007-03-19 13:17:45.000000000 +0100
+++ 2007-03-19/xen/arch/x86/mm.c        2007-03-19 13:21:29.000000000 +0100
@@ -2431,13 +2431,13 @@ int do_mmu_update(
         guest_handle_add_offset(ureqs, 1);
     }
 
-    domain_mmap_cache_destroy(&mapcache);
-    domain_mmap_cache_destroy(&sh_mapcache);
-
     process_deferred_ops();
 
     UNLOCK_BIGLOCK(d);
 
+    domain_mmap_cache_destroy(&mapcache);
+    domain_mmap_cache_destroy(&sh_mapcache);
+
  out:
     /* Add incremental work we have done to the @done output parameter. */
     if ( unlikely(!guest_handle_is_null(pdone)) )
@@ -2740,6 +2740,10 @@ int do_update_va_mapping(unsigned long v
         guest_unmap_l1e(v, pl1e);
     pl1e = NULL;
 
+    process_deferred_ops();
+
+    UNLOCK_BIGLOCK(d);
+
     switch ( flags & UVMF_FLUSHTYPE_MASK )
     {
     case UVMF_TLB_FLUSH:
@@ -2785,9 +2789,7 @@ int do_update_va_mapping(unsigned long v
         break;
     }
 
-    process_deferred_ops();
-    
-    UNLOCK_BIGLOCK(d);
+    WARN_ON(this_cpu(percpu_mm_info).deferred_ops);
 
     return rc;
 }
@@ -2806,6 +2808,8 @@ int do_update_va_mapping_otherdomain(uns
 
     rc = do_update_va_mapping(va, val64, flags);
 
+    this_cpu(percpu_mm_info).foreign = NULL;
+
     return rc;
 }
 



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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] further shrink the big-lock window, Jan Beulich <=