Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 May 2009 07:58:56 +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: r192628 - head/sys/mips/mips
Message-ID:  <200905230758.n4N7wupW049900@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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