diff options
author | alc <alc@FreeBSD.org> | 2002-07-13 20:13:34 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-07-13 20:13:34 +0000 |
commit | a23831a53890f04214677545c287decb8eb6b6d9 (patch) | |
tree | fb8cc9a317d3907bb58d9ba3dbfec45139aa6875 /sys/kern/vfs_bio.c | |
parent | ee17f219fb9065816011bc297e15dc930b8adb49 (diff) | |
download | FreeBSD-src-a23831a53890f04214677545c287decb8eb6b6d9.zip FreeBSD-src-a23831a53890f04214677545c287decb8eb6b6d9.tar.gz |
o Lock some page queue accesses, in particular, those by vm_page_unwire().
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index a3639b4..9b7c794 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1473,7 +1473,7 @@ vfs_vmio_release(bp) vm_page_t m; GIANT_REQUIRED; - + vm_page_lock_queues(); for (i = 0; i < bp->b_npages; i++) { m = bp->b_pages[i]; bp->b_pages[i] = NULL; @@ -1509,6 +1509,7 @@ vfs_vmio_release(bp) } } } + vm_page_unlock_queues(); pmap_qremove(trunc_page((vm_offset_t) bp->b_data), bp->b_npages); if (bp->b_bufsize) { @@ -2652,7 +2653,9 @@ allocbuf(struct buf *bp, int size) ; bp->b_pages[i] = NULL; + vm_page_lock_queues(); vm_page_unwire(m, 0); + vm_page_unlock_queues(); } pmap_qremove((vm_offset_t) trunc_page((vm_offset_t)bp->b_data) + (desiredpages << PAGE_SHIFT), (bp->b_npages - desiredpages)); @@ -3386,9 +3389,11 @@ vm_hold_free_pages(struct buf * bp, vm_offset_t from, vm_offset_t to) } bp->b_pages[index] = NULL; pmap_qremove(pg, 1); + vm_page_lock_queues(); vm_page_busy(p); vm_page_unwire(p, 0); vm_page_free(p); + vm_page_unlock_queues(); } } bp->b_npages = newnpages; |