summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2006-08-13 00:11:09 +0000
committeralc <alc@FreeBSD.org>2006-08-13 00:11:09 +0000
commitcc1f2c465bfc2a22dd28655bfc8e31004e2eee48 (patch)
treead3ea0a7916830d634d5b487c2f06408e41c01bf /sys/vm/vm_object.c
parentf6dcb4683584c820e63f041684eb1b3e8cd8ca5a (diff)
downloadFreeBSD-src-cc1f2c465bfc2a22dd28655bfc8e31004e2eee48.zip
FreeBSD-src-cc1f2c465bfc2a22dd28655bfc8e31004e2eee48.tar.gz
Reimplement the page's NOSYNC flag as an object-synchronized instead of a
page queues-synchronized flag. Reduce the scope of the page queues lock in vm_fault() accordingly. Move vm_fault()'s call to vm_object_set_writeable_dirty() outside of the scope of the page queues lock. Reviewed by: tegge Additionally, eliminate an unnecessary dereference in computing the argument that is passed to vm_object_set_writeable_dirty().
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index fd34f40..cef7b6a 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -687,7 +687,7 @@ vm_object_terminate(vm_object_t object)
*
* Clean all dirty pages in the specified range of object. Leaves page
* on whatever queue it is currently on. If NOSYNC is set then do not
- * write out pages with PG_NOSYNC set (originally comes from MAP_NOSYNC),
+ * write out pages with VPO_NOSYNC set (originally comes from MAP_NOSYNC),
* leaving the object dirty.
*
* When stuffing pages asynchronously, allow clustering. XXX we need a
@@ -765,7 +765,7 @@ vm_object_page_clean(vm_object_t object, vm_pindex_t start, vm_pindex_t end, int
* If we have been asked to skip nosync pages and
* this is a nosync page, we can't continue.
*/
- if ((flags & OBJPC_NOSYNC) && (p->flags & PG_NOSYNC)) {
+ if ((flags & OBJPC_NOSYNC) && (p->oflags & VPO_NOSYNC)) {
if (--scanlimit == 0)
break;
++tscan;
@@ -805,7 +805,7 @@ vm_object_page_clean(vm_object_t object, vm_pindex_t start, vm_pindex_t end, int
clearobjflags = 1;
TAILQ_FOREACH(p, &object->memq, listq) {
vm_page_flag_set(p, PG_CLEANCHK);
- if ((flags & OBJPC_NOSYNC) && (p->flags & PG_NOSYNC))
+ if ((flags & OBJPC_NOSYNC) && (p->oflags & VPO_NOSYNC))
clearobjflags = 0;
else
pmap_remove_write(p);
@@ -853,7 +853,7 @@ again:
* nosync page, skip it. Note that the object flags were
* not cleared in this case so we do not have to set them.
*/
- if ((flags & OBJPC_NOSYNC) && (p->flags & PG_NOSYNC)) {
+ if ((flags & OBJPC_NOSYNC) && (p->oflags & VPO_NOSYNC)) {
vm_page_flag_clear(p, PG_CLEANCHK);
continue;
}
OpenPOWER on IntegriCloud