svn commit: r238610 - head/sys/amd64/amd64
Alan Cox
alc at FreeBSD.org
Thu Jul 19 05:34:19 UTC 2012
Author: alc
Date: Thu Jul 19 05:34:19 2012
New Revision: 238610
URL: http://svn.freebsd.org/changeset/base/238610
Log:
Don't unnecessarily set PGA_REFERENCED in pmap_enter().
Modified:
head/sys/amd64/amd64/pmap.c
Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c Thu Jul 19 03:51:16 2012 (r238609)
+++ head/sys/amd64/amd64/pmap.c Thu Jul 19 05:34:19 2012 (r238610)
@@ -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 &&
More information about the svn-src-head
mailing list