push pmap_clear_reference calls into pdpolicy code, where reference bits

actually matter.
This commit is contained in:
yamt 2008-01-18 10:48:23 +00:00
parent 886189b384
commit 2b40f35040
7 changed files with 16 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: genfs_io.c,v 1.2 2008/01/02 11:48:59 ad Exp $ */
/* $NetBSD: genfs_io.c,v 1.3 2008/01/18 10:48:23 yamt Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.2 2008/01/02 11:48:59 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.3 2008/01/18 10:48:23 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1044,7 +1044,6 @@ genfs_do_putpages(struct vnode *vp, off_t startoff, off_t endoff, int flags,
if (tpg->offset < startoff || tpg->offset >= endoff)
continue;
if (flags & PGO_DEACTIVATE && tpg->wire_count == 0) {
(void) pmap_clear_reference(tpg);
uvm_pagedeactivate(tpg);
} else if (flags & PGO_FREE) {
pmap_page_protect(tpg, VM_PROT_NONE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_anon.c,v 1.50 2008/01/02 11:49:15 ad Exp $ */
/* $NetBSD: uvm_anon.c,v 1.51 2008/01/18 10:48:23 yamt Exp $ */
/*
*
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.50 2008/01/02 11:49:15 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.51 2008/01/18 10:48:23 yamt Exp $");
#include "opt_uvmhist.h"
@ -409,7 +409,6 @@ uvm_anon_pagein(struct vm_anon *anon)
* deactivate the page (to put it on a page queue)
*/
pmap_clear_reference(pg);
mutex_enter(&uvm_pageqlock);
if (pg->wire_count == 0)
uvm_pagedeactivate(pg);

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_aobj.c,v 1.96 2008/01/02 11:49:15 ad Exp $ */
/* $NetBSD: uvm_aobj.c,v 1.97 2008/01/18 10:48:23 yamt Exp $ */
/*
* Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.96 2008/01/02 11:49:15 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.97 2008/01/18 10:48:23 yamt Exp $");
#include "opt_uvmhist.h"
@ -833,7 +833,6 @@ uao_put(struct uvm_object *uobj, voff_t start, voff_t stop, int flags)
continue;
/* ...and deactivate the page. */
pmap_clear_reference(pg);
uvm_pagedeactivate(pg);
continue;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_fault.c,v 1.122 2008/01/02 11:49:16 ad Exp $ */
/* $NetBSD: uvm_fault.c,v 1.123 2008/01/18 10:48:23 yamt Exp $ */
/*
*
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.122 2008/01/02 11:49:16 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.123 2008/01/18 10:48:23 yamt Exp $");
#include "opt_uvmhist.h"
@ -203,7 +203,6 @@ uvmfault_anonflush(struct vm_anon **anons, int n)
if (pg && (pg->flags & PG_BUSY) == 0) {
mutex_enter(&uvm_pageqlock);
if (pg->wire_count == 0) {
pmap_clear_reference(pg);
uvm_pagedeactivate(pg);
}
mutex_exit(&uvm_pageqlock);

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_map.c,v 1.249 2008/01/08 13:09:55 yamt Exp $ */
/* $NetBSD: uvm_map.c,v 1.250 2008/01/18 10:48:23 yamt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.249 2008/01/08 13:09:55 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.250 2008/01/18 10:48:23 yamt Exp $");
#include "opt_ddb.h"
#include "opt_uvmhist.h"
@ -3802,7 +3802,6 @@ uvm_map_clean(struct vm_map *map, vaddr_t start, vaddr_t end, int flags)
continue;
}
KASSERT(pg->uanon == anon);
pmap_clear_reference(pg);
uvm_pagedeactivate(pg);
mutex_exit(&uvm_pageqlock);
mutex_exit(&anon->an_lock);

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_pdpolicy_clock.c,v 1.9 2008/01/02 11:49:20 ad Exp $ */
/* $NetBSD: uvm_pdpolicy_clock.c,v 1.10 2008/01/18 10:48:23 yamt Exp $ */
/* NetBSD: uvm_pdaemon.c,v 1.72 2006/01/05 10:47:33 yamt Exp $ */
/*
@ -74,7 +74,7 @@
#else /* defined(PDSIM) */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clock.c,v 1.9 2008/01/02 11:49:20 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clock.c,v 1.10 2008/01/18 10:48:23 yamt Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -275,7 +275,6 @@ uvmpdpol_balancequeue(int swap_shortage)
if (inactive_shortage > 0) {
/* no need to check wire_count as pg is "active" */
pmap_clear_reference(p);
uvmpdpol_pagedeactivate(p);
uvmexp.pddeact++;
inactive_shortage--;
@ -296,6 +295,7 @@ uvmpdpol_pagedeactivate(struct vm_page *pg)
}
if ((pg->pqflags & PQ_INACTIVE) == 0) {
KASSERT(pg->wire_count == 0);
pmap_clear_reference(pg);
TAILQ_INSERT_TAIL(&pdpol_state.s_inactiveq, pg, pageq);
pg->pqflags |= PQ_INACTIVE;
pdpol_state.s_inactive++;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_pdpolicy_clockpro.c,v 1.11 2008/01/13 16:28:41 yamt Exp $ */
/* $NetBSD: uvm_pdpolicy_clockpro.c,v 1.12 2008/01/18 10:48:23 yamt Exp $ */
/*-
* Copyright (c)2005, 2006 YAMAMOTO Takashi,
@ -43,7 +43,7 @@
#else /* defined(PDSIM) */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clockpro.c,v 1.11 2008/01/13 16:28:41 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clockpro.c,v 1.12 2008/01/18 10:48:23 yamt Exp $");
#include "opt_ddb.h"
@ -1081,7 +1081,7 @@ void
uvmpdpol_pagedeactivate(struct vm_page *pg)
{
pg->pqflags &= ~PQ_REFERENCED;
clockpro_clearreferencebit(pg);
}
void