From owner-svn-src-head@FreeBSD.ORG Thu Jul 19 05:34:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1AF9106564A; Thu, 19 Jul 2012 05:34:19 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCB858FC0A; Thu, 19 Jul 2012 05:34:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6J5YJHl047457; Thu, 19 Jul 2012 05:34:19 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6J5YJm5047455; Thu, 19 Jul 2012 05:34:19 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207190534.q6J5YJm5047455@svn.freebsd.org> From: Alan Cox Date: Thu, 19 Jul 2012 05:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238610 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2012 05:34:19 -0000 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 &&