diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-20 13:43:01 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-28 15:47:56 +0200 |
commit | ff7a6dae1e8a6a4d5ce4591b682116e22e76dc18 (patch) | |
tree | c1b071867a2a55f7747dd800c5021be31716e93d /vm/vm_fault.c | |
parent | 787a6034170b59d55afe8d0a12cb0904f20cb74d (diff) |
yyy avoid unlocking while zeroing or copying
Diffstat (limited to 'vm/vm_fault.c')
-rw-r--r-- | vm/vm_fault.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/vm/vm_fault.c b/vm/vm_fault.c index 40d1cbc..1ed9e03 100644 --- a/vm/vm_fault.c +++ b/vm/vm_fault.c @@ -462,15 +462,16 @@ vm_fault_return_t vm_fault_page( m = real_m; /* - * Drop the lock while zero filling - * page. Then break because this - * is the page we wanted. Checking - * the page lock is a waste of time; - * this page was either absent or - * newly allocated -- in both cases - * it can't be page locked by a pager. + * Zero fill the page. Then + * break because this is the + * page we wanted. Checking + * the page lock is a waste + * of time; this page was + * either absent or newly + * allocated -- in both cases + * it can't be page locked by + * a pager. */ - vm_object_unlock(object); vm_page_zero_fill(m); @@ -478,7 +479,6 @@ vm_fault_return_t vm_fault_page( vm_stat.zero_fill_count++; current_task()->zero_fills++; - vm_object_lock(object); pmap_clear_modify(m->phys_addr); break; } else { @@ -755,12 +755,10 @@ vm_fault_return_t vm_fault_page( return(VM_FAULT_MEMORY_SHORTAGE); } - vm_object_unlock(object); vm_page_zero_fill(m); vm_stat_sample(SAMPLED_PC_VM_ZFILL_FAULTS); vm_stat.zero_fill_count++; current_task()->zero_fills++; - vm_object_lock(object); pmap_clear_modify(m->phys_addr); break; } @@ -841,9 +839,7 @@ vm_fault_return_t vm_fault_page( return(VM_FAULT_MEMORY_SHORTAGE); } - vm_object_unlock(object); vm_page_copy(m, copy_m); - vm_object_lock(object); /* * If another map is truly sharing this |