summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2009-02-25 07:52:53 +0000
committeralc <alc@FreeBSD.org>2009-02-25 07:52:53 +0000
commit8a8f5251fa38b7eed0a1411e89502dd307d6eac2 (patch)
treed46606eab2e40cdb828299d8647ddb39d14f9e71 /sys/vm
parentba8a8daf8d72a5148614af6990c0a54582c18103 (diff)
downloadFreeBSD-src-8a8f5251fa38b7eed0a1411e89502dd307d6eac2.zip
FreeBSD-src-8a8f5251fa38b7eed0a1411e89502dd307d6eac2.tar.gz
Prior to r188331 a map entry's last read offset was only updated by a hard
fault. In r188331 this update was relocated because of synchronization changes to a place where it would occur on both hard and soft faults. This change again restricts the update to hard faults.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_fault.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index e647288..bd7de42 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -868,13 +868,17 @@ vnode_locked:
}
}
/*
- * update lastr imperfectly (we do not know how much
- * getpages will actually read), but good enough.
+ * If the page was filled by a pager, update the map entry's
+ * last read offset. Since the pager does not return the
+ * actual set of pages that it read, this update is based on
+ * the requested set. Typically, the requested and actual
+ * sets are the same.
*
* XXX The following assignment modifies the map
* without holding a write lock on it.
*/
- fs.entry->lastr = fs.pindex + faultcount - behind;
+ if (hardfault)
+ fs.entry->lastr = fs.pindex + faultcount - behind;
if (prot & VM_PROT_WRITE) {
vm_object_set_writeable_dirty(fs.object);
OpenPOWER on IntegriCloud