diff options
author | alc <alc@FreeBSD.org> | 2013-06-06 06:17:20 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2013-06-06 06:17:20 +0000 |
commit | e60ab9c72d61f9ec88a4887e299551d7c3234907 (patch) | |
tree | 3a1e174973dd48f9da2206c49f231a4b36111937 /sys/kern/kern_exec.c | |
parent | 38a637b8a0c41db72b88be9e4e6962f2981be080 (diff) | |
download | FreeBSD-src-e60ab9c72d61f9ec88a4887e299551d7c3234907.zip FreeBSD-src-e60ab9c72d61f9ec88a4887e299551d7c3234907.tar.gz |
Don't busy the page unless we are likely to release the object lock.
Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index c45b974..c0e1435 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -937,8 +937,10 @@ exec_map_first_page(imgp) object->pg_color = 0; } #endif - ma[0] = vm_page_grab(object, 0, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); + ma[0] = vm_page_grab(object, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | + VM_ALLOC_RETRY); if (ma[0]->valid != VM_PAGE_BITS_ALL) { + vm_page_busy(ma[0]); initial_pagein = VM_INITIAL_PAGEIN; if (initial_pagein > object->size) initial_pagein = object->size; @@ -968,11 +970,11 @@ exec_map_first_page(imgp) VM_OBJECT_WUNLOCK(object); return (EIO); } + vm_page_wakeup(ma[0]); } vm_page_lock(ma[0]); vm_page_hold(ma[0]); vm_page_unlock(ma[0]); - vm_page_wakeup(ma[0]); VM_OBJECT_WUNLOCK(object); imgp->firstpage = sf_buf_alloc(ma[0], 0); |