summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2007-11-22 20:01:38 +0000
committeralc <alc@FreeBSD.org>2007-11-22 20:01:38 +0000
commitdbffaeda474abba82174e7d4fe5b60d77797500a (patch)
tree70de484766159d24bebc5e23dcba141dae31d619
parentefd5ecffc9914a2bbe8c042722370a8241b58224 (diff)
downloadFreeBSD-src-dbffaeda474abba82174e7d4fe5b60d77797500a.zip
FreeBSD-src-dbffaeda474abba82174e7d4fe5b60d77797500a.tar.gz
Remove an unnecessary call to pmap_remove_all() and the associated "XXX"
comments from vnode_pager_setsize(). This call was introduced in revision 1.140 to address a problem that no longer exists. Specifically, pmap_zero_page_area() has replaced a (possibly) problematic implementation of page zeroing that was based on vm_pager_map(), bzero(), and vm_pager_unmap().
-rw-r--r--sys/vm/vnode_pager.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index fd60f7e..0bb5686 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -395,21 +395,6 @@ vnode_pager_setsize(vp, nsize)
pmap_zero_page_area(m, base, size);
/*
- * XXX work around SMP data integrity race
- * by unmapping the page from user processes.
- * The garbage we just cleared may be mapped
- * to a user process running on another cpu
- * and this code is not running through normal
- * I/O channels which handle SMP issues for
- * us, so unmap page to synchronize all cpus.
- *
- * XXX should vm_pager_unmap_page() have
- * dealt with this?
- */
- vm_page_lock_queues();
- pmap_remove_all(m);
-
- /*
* Clear out partial-page dirty bits. This
* has the side effect of setting the valid
* bits, but that is ok. There are a bunch
@@ -422,6 +407,7 @@ vnode_pager_setsize(vp, nsize)
* bits. This would prevent bogus_page
* replacement from working properly.
*/
+ vm_page_lock_queues();
vm_page_set_validclean(m, base, size);
if (m->dirty != 0)
m->dirty = VM_PAGE_BITS_ALL;
OpenPOWER on IntegriCloud