summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2001-07-05 01:32:42 +0000
committerdillon <dillon@FreeBSD.org>2001-07-05 01:32:42 +0000
commit1cf218e40f33f1f84ab5aea35ab812cfa1b46302 (patch)
tree4f13877024500ba8eed1f8aa537da3e416268450 /sys/ia64
parent93369f554a43c46419d56436721efe61e4b858c7 (diff)
downloadFreeBSD-src-1cf218e40f33f1f84ab5aea35ab812cfa1b46302.zip
FreeBSD-src-1cf218e40f33f1f84ab5aea35ab812cfa1b46302.tar.gz
Move vm_page_zero_idle() from machine-dependant sections to a
machine-independant source file, vm/vm_zeroidle.c. It was exactly the same for all platforms and updating them all was getting annoying.
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/vm_machdep.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c
index c38f983..35a45b9 100644
--- a/sys/ia64/ia64/vm_machdep.c
+++ b/sys/ia64/ia64/vm_machdep.c
@@ -444,71 +444,6 @@ grow_stack(p, sp)
return (1);
}
-
-static int cnt_prezero;
-
-SYSCTL_INT(_machdep, OID_AUTO, cnt_prezero, CTLFLAG_RD, &cnt_prezero, 0, "");
-
-/*
- * Implement the pre-zeroed page mechanism.
- * This routine is called from the idle loop.
- */
-
-#define ZIDLE_LO(v) ((v) * 2 / 3)
-#define ZIDLE_HI(v) ((v) * 4 / 5)
-
-int
-vm_page_zero_idle()
-{
- static int free_rover;
- static int zero_state;
- vm_page_t m;
- int s;
-
- /*
- * Attempt to maintain approximately 1/2 of our free pages in a
- * PG_ZERO'd state. Add some hysteresis to (attempt to) avoid
- * generally zeroing a page when the system is near steady-state.
- * Otherwise we might get 'flutter' during disk I/O / IPC or
- * fast sleeps. We also do not want to be continuously zeroing
- * pages because doing so may flush our L1 and L2 caches too much.
- */
-
- if (zero_state && vm_page_zero_count >= ZIDLE_LO(cnt.v_free_count)) {
- return(0);
- }
- if (vm_page_zero_count >= ZIDLE_HI(cnt.v_free_count)) {
- return(0);
- }
- if (mtx_trylock(&Giant)) {
- s = splvm();
- m = vm_pageq_find(PQ_FREE, free_rover, FALSE);
- zero_state = 0;
- if (m != NULL && (m->flags & PG_ZERO) == 0) {
- vm_page_queues[m->queue].lcnt--;
- TAILQ_REMOVE(&vm_page_queues[m->queue].pl, m, pageq);
- m->queue = PQ_NONE;
- splx(s);
- pmap_zero_page(VM_PAGE_TO_PHYS(m));
- (void)splvm();
- vm_page_flag_set(m, PG_ZERO);
- m->queue = PQ_FREE + m->pc;
- vm_page_queues[m->queue].lcnt++;
- TAILQ_INSERT_TAIL(&vm_page_queues[m->queue].pl, m,
- pageq);
- ++vm_page_zero_count;
- ++cnt_prezero;
- if (vm_page_zero_count >= ZIDLE_HI(cnt.v_free_count))
- zero_state = 1;
- }
- free_rover = (free_rover + PQ_PRIME2) & PQ_L2_MASK;
- splx(s);
- mtx_unlock(&Giant);
- return (1);
- }
- return(0);
-}
-
/*
* Software interrupt handler for queued VM system processing.
*/
OpenPOWER on IntegriCloud