Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Apr 2010 15:22:52 +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: r207437 - head/sys/powerpc/booke
Message-ID:  <201004301522.o3UFMqbe004043@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Fri Apr 30 15:22:52 2010
New Revision: 207437
URL: http://svn.freebsd.org/changeset/base/207437

Log:
  MFamd64/i386 r207205
    Clearing a page table entry's accessed bit and setting the page's
    PG_REFERENCED flag in pmap_protect() can't really be justified, so
    don't do it.
  
  Additionally, two changes that make this pmap behave like the others do:
  
  Change pmap_protect() such that it calls vm_page_dirty() only if the
  page is managed.
  
  Change pmap_remove_write() such that it doesn't clear a page table
  entry's accessed bit.

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c	Fri Apr 30 15:12:30 2010	(r207436)
+++ head/sys/powerpc/booke/pmap.c	Fri Apr 30 15:22:52 2010	(r207437)
@@ -1915,16 +1915,11 @@ mmu_booke_protect(mmu_t mmu, pmap_t pmap
 				tlb_miss_lock();
 
 				/* Handle modified pages. */
-				if (PTE_ISMODIFIED(pte))
+				if (PTE_ISMODIFIED(pte) && PTE_ISMANAGED(pte))
 					vm_page_dirty(m);
 
-				/* Referenced pages. */
-				if (PTE_ISREFERENCED(pte))
-					vm_page_flag_set(m, PG_REFERENCED);
-
 				tlb0_flush_entry(va);
-				pte->flags &= ~(PTE_UW | PTE_SW | PTE_MODIFIED |
-				    PTE_REFERENCED);
+				pte->flags &= ~(PTE_UW | PTE_SW | PTE_MODIFIED);
 
 				tlb_miss_unlock();
 				mtx_unlock_spin(&tlbivax_mutex);
@@ -1962,13 +1957,8 @@ mmu_booke_remove_write(mmu_t mmu, vm_pag
 				if (PTE_ISMODIFIED(pte))
 					vm_page_dirty(m);
 
-				/* Referenced pages. */
-				if (PTE_ISREFERENCED(pte))
-					vm_page_flag_set(m, PG_REFERENCED);
-
 				/* Flush mapping from TLB0. */
-				pte->flags &= ~(PTE_UW | PTE_SW | PTE_MODIFIED |
-				    PTE_REFERENCED);
+				pte->flags &= ~(PTE_UW | PTE_SW | PTE_MODIFIED);
 
 				tlb_miss_unlock();
 				mtx_unlock_spin(&tlbivax_mutex);



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