diff options
author | Alan Cox <alc@FreeBSD.org> | 2006-08-13 00:11:09 +0000 |
---|---|---|
committer | Alan Cox <alc@FreeBSD.org> | 2006-08-13 00:11:09 +0000 |
commit | b146f9e5d29e6b1045d8e7612875884338297a38 (patch) | |
tree | ad3ea0a7916830d634d5b487c2f06408e41c01bf /sys/vm/vm_fault.c | |
parent | c157a036a9cac44c843f2d89a42192db51c7ebef (diff) | |
download | src-b146f9e5d29e6b1045d8e7612875884338297a38.tar.gz src-b146f9e5d29e6b1045d8e7612875884338297a38.zip |
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().
Notes
Notes:
svn path=/head/; revision=161257
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r-- | sys/vm/vm_fault.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index b122c365146a..5922ff67d5c2 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -842,14 +842,15 @@ readrest: if (prot & VM_PROT_WRITE) { vm_page_lock_queues(); vm_page_flag_set(fs.m, PG_WRITEABLE); - vm_object_set_writeable_dirty(fs.m->object); + vm_page_unlock_queues(); + vm_object_set_writeable_dirty(fs.object); /* * If the fault is a write, we know that this page is being * written NOW so dirty it explicitly to save on * pmap_is_modified() calls later. * - * If this is a NOSYNC mmap we do not want to set PG_NOSYNC + * If this is a NOSYNC mmap we do not want to set VPO_NOSYNC * if the page is already dirty to prevent data written with * the expectation of being synced from not being synced. * Likewise if this entry does not request NOSYNC then make @@ -861,11 +862,10 @@ readrest: */ if (fs.entry->eflags & MAP_ENTRY_NOSYNC) { if (fs.m->dirty == 0) - vm_page_flag_set(fs.m, PG_NOSYNC); + fs.m->oflags |= VPO_NOSYNC; } else { - vm_page_flag_clear(fs.m, PG_NOSYNC); + fs.m->oflags &= ~VPO_NOSYNC; } - vm_page_unlock_queues(); if (fault_flags & VM_FAULT_DIRTY) { vm_page_dirty(fs.m); vm_pager_page_unswapped(fs.m); |