summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-03-04 15:16:07 +0000
committerdg <dg@FreeBSD.org>1995-03-04 15:16:07 +0000
commit2c92668cd970dc8344f40e3ceaa875f152b573b4 (patch)
tree8c9bf4db5e62345286496ed6dd7ca3cbc86e1771
parent8c0df6f11f7c038b9793ee8f38dc00c0ddb0c281 (diff)
downloadFreeBSD-src-2c92668cd970dc8344f40e3ceaa875f152b573b4.zip
FreeBSD-src-2c92668cd970dc8344f40e3ceaa875f152b573b4.tar.gz
Added some more of John's "anti-chatter" fixes - set the page activation
count to 0 after activating the page; the previous behavior biased the pages too high in some cases. Submitted by: John Dyson
-rw-r--r--sys/kern/vfs_bio.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 4379399..447794e 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -18,7 +18,7 @@
* 5. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: vfs_bio.c,v 1.32 1995/03/01 22:08:55 davidg Exp $
+ * $Id: vfs_bio.c,v 1.33 1995/03/03 22:13:00 davidg Exp $
*/
/*
@@ -462,8 +462,10 @@ brelse(struct buf * bp)
(m->flags & PG_REFERENCED) == 0 &&
!pmap_is_referenced(VM_PAGE_TO_PHYS(m)))
vm_page_cache(m);
- else if( (m->flags & PG_ACTIVE) == 0)
+ else if ((m->flags & PG_ACTIVE) == 0) {
vm_page_activate(m);
+ m->act_count = 0;
+ }
}
}
bufspace -= bp->b_bufsize;
@@ -994,8 +996,10 @@ allocbuf(struct buf * bp, int size, int vmio)
if (!vm_page_is_valid(m, toff + off, bytesinpage)) {
bp->b_flags &= ~B_CACHE;
}
- if ((m->flags & PG_ACTIVE) == 0)
+ if ((m->flags & PG_ACTIVE) == 0) {
vm_page_activate(m);
+ m->act_count = 0;
+ }
continue;
}
m = vm_page_lookup(obj, objoff);
@@ -1023,6 +1027,7 @@ allocbuf(struct buf * bp, int size, int vmio)
}
m->valid = 0;
vm_page_activate(m);
+ m->act_count = 0;
} else if ((m->valid == 0) || (m->flags & PG_BUSY)) {
int j;
int bufferdestroyed = 0;
@@ -1083,8 +1088,10 @@ allocbuf(struct buf * bp, int size, int vmio)
if (!vm_page_is_valid(m, toff + off, bytesinpage)) {
bp->b_flags &= ~B_CACHE;
}
- if ((m->flags & PG_ACTIVE) == 0)
+ if ((m->flags & PG_ACTIVE) == 0) {
vm_page_activate(m);
+ m->act_count = 0;
+ }
m->flags |= PG_BUSY;
}
bp->b_pages[pageindex] = m;
OpenPOWER on IntegriCloud