svn commit: r192628 - head/sys/mips/mips

Alan Cox alc at FreeBSD.org
Sat May 23 07:58:56 UTC 2009


Author: alc
Date: Sat May 23 07:58:56 2009
New Revision: 192628
URL: http://svn.freebsd.org/changeset/base/192628

Log:
  Preset the modified bit in the PTE when pmap_enter() is called during a
  write fault or while wiring a mapping that must support write access.
  
  In general, this change should reduce the number of traps that occur for
  the purpose of setting the modified bit.  More specifically, this change
  should prevent traps while holding locks in a sysctl handler.  See
  kern/kern_sysctl.c revisions 1.168 and 1.195 (svn r192160) for further
  details.
  
  Tested by: gonzo

Modified:
  head/sys/mips/mips/pmap.c

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Sat May 23 07:16:17 2009	(r192627)
+++ head/sys/mips/mips/pmap.c	Sat May 23 07:58:56 2009	(r192628)
@@ -1849,6 +1849,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, 
 		pmap->pm_stats.wired_count++;
 
 validate:
+	if ((access & VM_PROT_WRITE) != 0)
+		m->md.pv_flags |= PV_TABLE_MOD | PV_TABLE_REF;
 	rw = init_pte_prot(va, m, prot);
 
 #ifdef PMAP_DEBUG


More information about the svn-src-head mailing list