summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2009-05-11 05:16:57 +0000
committeralc <alc@FreeBSD.org>2009-05-11 05:16:57 +0000
commit123b385c443b5265285c082a625ac0b38d7414b9 (patch)
tree81479028093a0118e14110db34682db9fa1420b4 /sys
parenta3bc0bfa1666e9aff669aa69c4b7e5b3bcef38d4 (diff)
downloadFreeBSD-src-123b385c443b5265285c082a625ac0b38d7414b9.zip
FreeBSD-src-123b385c443b5265285c082a625ac0b38d7414b9.tar.gz
Revert CVS revision 1.94 (svn r16840). Current pmap implementations don't
suffer from the race condition that motivated revision 1.94. Consequently, the work-around that was implemented by revision 1.94 is no longer needed. Moreover, reverting this work-around eliminates the need for vfs_busy_pages() to acquire the page queues lock when preparing a buffer for read. Reviewed by: tegge
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_bio.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index b9ae5ca..58e3491 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -3519,7 +3519,8 @@ retry:
goto retry;
}
bogus = 0;
- vm_page_lock_queues();
+ if (clear_modify)
+ vm_page_lock_queues();
for (i = 0; i < bp->b_npages; i++) {
m = bp->b_pages[i];
@@ -3542,17 +3543,18 @@ retry:
* It may not work properly with small-block devices.
* We need to find a better way.
*/
- pmap_remove_all(m);
- if (clear_modify)
+ if (clear_modify) {
+ pmap_remove_write(m);
vfs_page_set_valid(bp, foff, m);
- else if (m->valid == VM_PAGE_BITS_ALL &&
+ } else if (m->valid == VM_PAGE_BITS_ALL &&
(bp->b_flags & B_CACHE) == 0) {
bp->b_pages[i] = bogus_page;
bogus++;
}
foff = (foff + PAGE_SIZE) & ~(off_t)PAGE_MASK;
}
- vm_page_unlock_queues();
+ if (clear_modify)
+ vm_page_unlock_queues();
VM_OBJECT_UNLOCK(obj);
if (bogus)
pmap_qenter(trunc_page((vm_offset_t)bp->b_data),
OpenPOWER on IntegriCloud