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>
This commit is contained in:
kfraser@localhost.localdomain committed 2007-03-27 16:03:30 +01:00
1 parent 9726237543
commit 86daec4c06
1 file changed
+10 -7
+10 -7
View File
@@ -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 va, u64 val64,
guest_unmap_l1e(v, pl1e);
pl1e = NULL;
process_deferred_ops();
UNLOCK_BIGLOCK(d);
switch ( flags & UVMF_FLUSHTYPE_MASK )
{
case UVMF_TLB_FLUSH:
@@ -2785,10 +2789,6 @@ int do_update_va_mapping(unsigned long va, u64 val64,
break;
}
process_deferred_ops();
UNLOCK_BIGLOCK(d);
return rc;
}
@@ -2806,6 +2806,9 @@ int do_update_va_mapping_otherdomain(unsigned long va, u64 val64,
rc = do_update_va_mapping(va, val64, flags);
BUG_ON(this_cpu(percpu_mm_info).deferred_ops);
process_deferred_ops(); /* only to clear foreigndom */
return rc;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.