summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-03-12 09:55:57 +0000
committerbde <bde@FreeBSD.org>1998-03-12 09:55:57 +0000
commit2f6ffebcd60aed05d5c850e68079eb6858dfe2ba (patch)
treea280cc0f6d7e96601a777715b249586f2b3d1caa /sys/amd64
parentf5d499ef4c5e52e8aa6a848cb253f053e4cd43e0 (diff)
downloadFreeBSD-src-2f6ffebcd60aed05d5c850e68079eb6858dfe2ba.zip
FreeBSD-src-2f6ffebcd60aed05d5c850e68079eb6858dfe2ba.tar.gz
Fixed breakage of the !SMP case in vm_page_zero_idle() in the
previous commit. Opportunities to clean pages were often missed, and leaving of the idle state was sometimes delayed until the next interrupt (after any that occurred while cleaning). Fixed an unstaticization, a syntax error and a style bug in the previous commit.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/vm_machdep.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index c28ad33..4c0533d 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $Id: vm_machdep.c,v 1.100 1998/02/13 05:30:18 bde Exp $
+ * $Id: vm_machdep.c,v 1.101 1998/02/25 03:56:09 dyson Exp $
*/
#include "npx.h"
@@ -915,8 +915,7 @@ grow(p, sp)
return (1);
}
-
-int cnt_prezero;
+static int cnt_prezero;
SYSCTL_INT(_machdep, OID_AUTO, cnt_prezero, CTLFLAG_RD, &cnt_prezero, 0, "");
@@ -961,13 +960,14 @@ vm_page_zero_idle()
rel_mplock();
#endif
pmap_zero_page(VM_PAGE_TO_PHYS(m));
-#ifdef 0
+#if 0
get_mplock();
#endif
(void)splvm();
m->queue = PQ_ZERO + m->pc;
++(*vm_page_queues[m->queue].lcnt);
- TAILQ_INSERT_HEAD(vm_page_queues[m->queue].pl, m, pageq);
+ TAILQ_INSERT_HEAD(vm_page_queues[m->queue].pl, m,
+ pageq);
free_rover = (free_rover + PQ_PRIME3) & PQ_L2_MASK;
++vm_page_zero_count;
++cnt_prezero;
@@ -976,7 +976,9 @@ vm_page_zero_idle()
disable_intr();
#ifdef SMP
rel_mplock();
+#endif
return (1);
+#ifdef SMP
}
#endif
return (0);
OpenPOWER on IntegriCloud