summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2002-07-14 19:45:46 +0000
committerAlan Cox <alc@FreeBSD.org>2002-07-14 19:45:46 +0000
commit917570953209e1cad075974d0e38f3a9d65c2fb2 (patch)
tree5447bff25f7002f154b187193df4dce5c776028d
parente16cfdbea47bc0c7d83898d1747bbb795d7fe36f (diff)
Notes
-rw-r--r--sys/kern/vfs_bio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 9b7c7942633e..58a5adb07789 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2698,8 +2698,10 @@ allocbuf(struct buf *bp, int size)
VM_WAIT;
vm_pageout_deficit += desiredpages - bp->b_npages;
} else {
+ vm_page_lock_queues();
vm_page_wire(m);
vm_page_wakeup(m);
+ vm_page_unlock_queues();
bp->b_flags &= ~B_CACHE;
bp->b_pages[bp->b_npages] = m;
++bp->b_npages;
@@ -2732,8 +2734,10 @@ allocbuf(struct buf *bp, int size)
(cnt.v_free_min + cnt.v_cache_min))) {
pagedaemon_wakeup();
}
+ vm_page_lock_queues();
vm_page_flag_clear(m, PG_ZERO);
vm_page_wire(m);
+ vm_page_unlock_queues();
bp->b_pages[bp->b_npages] = m;
++bp->b_npages;
}
@@ -3354,9 +3358,11 @@ tryagain:
VM_WAIT;
goto tryagain;
}
+ vm_page_lock_queues();
vm_page_wire(p);
p->valid = VM_PAGE_BITS_ALL;
vm_page_flag_clear(p, PG_ZERO);
+ vm_page_unlock_queues();
pmap_qenter(pg, &p, 1);
bp->b_pages[index] = p;
vm_page_wakeup(p);