Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Apr 2010 05:35:35 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r207262 - head/sys/i386/xen
Message-ID:  <201004270535.o3R5Zafj013748@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Tue Apr 27 05:35:35 2010
New Revision: 207262
URL: http://svn.freebsd.org/changeset/base/207262

Log:
  MFi386 r207205
    Clearing a page table entry's accessed bit (PG_A) and setting the
    page's PG_REFERENCED flag in pmap_protect() can't really be justified,
    so don't do it.

Modified:
  head/sys/i386/xen/pmap.c

Modified: head/sys/i386/xen/pmap.c
==============================================================================
--- head/sys/i386/xen/pmap.c	Tue Apr 27 05:18:02 2010	(r207261)
+++ head/sys/i386/xen/pmap.c	Tue Apr 27 05:35:35 2010	(r207262)
@@ -2600,22 +2600,16 @@ retry:
 			obits = pbits = *pte;
 			if ((pbits & PG_V) == 0)
 				continue;
-			if (pbits & PG_MANAGED) {
-				m = NULL;
-				if (pbits & PG_A) {
-					m = PHYS_TO_VM_PAGE(xpmap_mtop(pbits) & PG_FRAME);
-					vm_page_flag_set(m, PG_REFERENCED);
-					pbits &= ~PG_A;
-				}
-				if ((pbits & PG_M) != 0) {
-					if (m == NULL)
-						m = PHYS_TO_VM_PAGE(xpmap_mtop(pbits) & PG_FRAME);
+
+			if ((prot & VM_PROT_WRITE) == 0) {
+				if ((pbits & (PG_MANAGED | PG_M | PG_RW)) ==
+				    (PG_MANAGED | PG_M | PG_RW)) {
+					m = PHYS_TO_VM_PAGE(xpmap_mtop(pbits) &
+					    PG_FRAME);
 					vm_page_dirty(m);
 				}
-			}
-
-			if ((prot & VM_PROT_WRITE) == 0)
 				pbits &= ~(PG_RW | PG_M);
+			}
 #ifdef PAE
 			if ((prot & VM_PROT_EXECUTE) == 0)
 				pbits |= pg_nx;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004270535.o3R5Zafj013748>