Don't unnecessarily set PGA_REFERENCED in pmap_enter().

This commit is contained in:
Alan Cox 2012-07-19 05:34:19 +00:00
parent bb06995571
commit 3088e08c4b

View File

@ -3576,13 +3576,9 @@ validate:
if ((origpte & PG_V) != 0) {
invlva = FALSE;
origpte = pte_load_store(pte, newpte);
if ((origpte & PG_A) != 0) {
if ((origpte & PG_MANAGED) != 0)
vm_page_aflag_set(om, PGA_REFERENCED);
if (opa != pa || ((origpte & PG_NX) == 0 &&
(newpte & PG_NX) != 0))
invlva = TRUE;
}
if ((origpte & PG_A) != 0 && (opa != pa ||
((origpte & PG_NX) == 0 && (newpte & PG_NX) != 0)))
invlva = TRUE;
if ((origpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) {
if ((origpte & PG_MANAGED) != 0)
vm_page_dirty(om);
@ -3590,6 +3586,8 @@ validate:
invlva = TRUE;
}
if (opa != pa && (origpte & PG_MANAGED) != 0) {
if ((origpte & PG_A) != 0)
vm_page_aflag_set(om, PGA_REFERENCED);
CHANGE_PV_LIST_LOCK_TO_PHYS(&lock, opa);
pmap_pvh_free(&om->md, pmap, va);
if ((om->aflags & PGA_WRITEABLE) != 0 &&