summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-10-04 03:05:09 +0000
committerdg <dg@FreeBSD.org>1994-10-04 03:05:09 +0000
commit467ebd68491cd821e382a8d83357a6e4e56130d2 (patch)
tree7c44bb0a3e72fbd64bd379fd64cd8dcae2a744bb
parent8a19acef0be008d6d541b694f0de5a0b152d1a8e (diff)
downloadFreeBSD-src-467ebd68491cd821e382a8d83357a6e4e56130d2.zip
FreeBSD-src-467ebd68491cd821e382a8d83357a6e4e56130d2.tar.gz
Fixed bug related to proper sensing of page modification that we
inadvertantly introduced in pre-1.1.5. This could cause page modifications to go unnoticed during certain extreme low memory/high paging rate conditions. Submitted by: John Dyson and David Greenman
-rw-r--r--sys/vm/vm_pageout.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index d2d805f..dac738c 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -65,7 +65,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_pageout.c,v 1.11 1994/09/12 11:31:36 davidg Exp $
+ * $Id: vm_pageout.c,v 1.12 1994/09/12 15:06:14 davidg Exp $
*/
/*
@@ -646,15 +646,16 @@ rescan1:
}
/*
- * if page is clean and but the page has been referenced,
- * then reactivate the page, but if we are very low on memory
- * or the page has not been referenced, then we free it to the
- * vm system.
+ * NOTE: PG_CLEAN doesn't guarantee that the page is clean.
*/
if (m->flags & PG_CLEAN) {
- if ((cnt.v_free_count > vm_pageout_free_min) /* XXX */
- && ((pmap_is_referenced(VM_PAGE_TO_PHYS(m)) ||
- (m->flags & PG_REFERENCED) != 0))) {
+ /*
+ * If we're not low on memory and the page has been reference,
+ * or if the page has been modified, then reactivate the page.
+ */
+ if (((cnt.v_free_count > vm_pageout_free_min) &&
+ (pmap_is_referenced(VM_PAGE_TO_PHYS(m)) || ((m->flags & PG_REFERENCED) != 0))) ||
+ pmap_is_modified(VM_PAGE_TO_PHYS(m))) {
m->flags &= ~PG_REFERENCED;
vm_page_activate(m);
} else if (!m->act_count) {
OpenPOWER on IntegriCloud