From 2f6ffebcd60aed05d5c850e68079eb6858dfe2ba Mon Sep 17 00:00:00 2001 From: bde Date: Thu, 12 Mar 1998 09:55:57 +0000 Subject: 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. --- sys/amd64/amd64/vm_machdep.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sys/amd64/amd64/vm_machdep.c') 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); -- cgit v1.1