ia64/xen-unstable
changeset 14591:f1014cbe906a
Further shrink the big-lock window.
A few more adjustments to when the 'big' lock is taken/dropped.
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@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
A few more adjustments to when the 'big' lock is taken/dropped.
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@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kfraser@localhost.localdomain |
---|---|
date | Tue Mar 27 16:03:30 2007 +0100 (2007-03-27) |
parents | 070cf119a7ec |
children | a9a39cc52e74 |
files | xen/arch/x86/mm.c |
line diff
1.1 --- a/xen/arch/x86/mm.c Tue Mar 27 15:53:45 2007 +0100 1.2 +++ b/xen/arch/x86/mm.c Tue Mar 27 16:03:30 2007 +0100 1.3 @@ -2431,13 +2431,13 @@ int do_mmu_update( 1.4 guest_handle_add_offset(ureqs, 1); 1.5 } 1.6 1.7 - domain_mmap_cache_destroy(&mapcache); 1.8 - domain_mmap_cache_destroy(&sh_mapcache); 1.9 - 1.10 process_deferred_ops(); 1.11 1.12 UNLOCK_BIGLOCK(d); 1.13 1.14 + domain_mmap_cache_destroy(&mapcache); 1.15 + domain_mmap_cache_destroy(&sh_mapcache); 1.16 + 1.17 out: 1.18 /* Add incremental work we have done to the @done output parameter. */ 1.19 if ( unlikely(!guest_handle_is_null(pdone)) ) 1.20 @@ -2740,6 +2740,10 @@ int do_update_va_mapping(unsigned long v 1.21 guest_unmap_l1e(v, pl1e); 1.22 pl1e = NULL; 1.23 1.24 + process_deferred_ops(); 1.25 + 1.26 + UNLOCK_BIGLOCK(d); 1.27 + 1.28 switch ( flags & UVMF_FLUSHTYPE_MASK ) 1.29 { 1.30 case UVMF_TLB_FLUSH: 1.31 @@ -2785,10 +2789,6 @@ int do_update_va_mapping(unsigned long v 1.32 break; 1.33 } 1.34 1.35 - process_deferred_ops(); 1.36 - 1.37 - UNLOCK_BIGLOCK(d); 1.38 - 1.39 return rc; 1.40 } 1.41 1.42 @@ -2806,6 +2806,9 @@ int do_update_va_mapping_otherdomain(uns 1.43 1.44 rc = do_update_va_mapping(va, val64, flags); 1.45 1.46 + BUG_ON(this_cpu(percpu_mm_info).deferred_ops); 1.47 + process_deferred_ops(); /* only to clear foreigndom */ 1.48 + 1.49 return rc; 1.50 } 1.51