diff options
author | alc <alc@FreeBSD.org> | 2002-12-27 06:09:56 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-12-27 06:09:56 +0000 |
commit | b9ffe85ed268c0991ac3ab9c47b5a89ae1d58afa (patch) | |
tree | c891968b3341e1021e7b7b572c2f8f4de92fa013 /sys | |
parent | 691282b8597c6c94e2701c7ff50679d16ee20a39 (diff) | |
download | FreeBSD-src-b9ffe85ed268c0991ac3ab9c47b5a89ae1d58afa.zip FreeBSD-src-b9ffe85ed268c0991ac3ab9c47b5a89ae1d58afa.tar.gz |
Increase the scope of the page queues lock in phys_pager_getpages().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/phys_pager.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/vm/phys_pager.c b/sys/vm/phys_pager.c index 82ce6f2..67d1ad0 100644 --- a/sys/vm/phys_pager.c +++ b/sys/vm/phys_pager.c @@ -139,17 +139,19 @@ phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage) int i, s; s = splvm(); + vm_page_lock_queues(); /* * Fill as many pages as vm_fault has allocated for us. */ for (i = 0; i < count; i++) { - if ((m[i]->flags & PG_ZERO) == 0) + if ((m[i]->flags & PG_ZERO) == 0) { + vm_page_unlock_queues(); pmap_zero_page(m[i]); - /* Switch off pv_entries */ - vm_page_lock_queues(); + vm_page_lock_queues(); + } vm_page_flag_set(m[i], PG_ZERO); + /* Switch off pv_entries */ vm_page_unmanage(m[i]); - vm_page_unlock_queues(); m[i]->valid = VM_PAGE_BITS_ALL; m[i]->dirty = 0; /* The requested page must remain busy, the others not. */ @@ -158,6 +160,7 @@ phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage) m[i]->busy = 0; } } + vm_page_unlock_queues(); splx(s); return (VM_PAGER_OK); |