From owner-svn-src-head@FreeBSD.ORG Sat May 23 07:58:56 2009 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 7CE03106566C; Sat, 23 May 2009 07:58:56 +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 6AC668FC12; Sat, 23 May 2009 07:58:56 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4N7wuLw049901; Sat, 23 May 2009 07:58:56 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4N7wupW049900; Sat, 23 May 2009 07:58:56 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200905230758.n4N7wupW049900@svn.freebsd.org> From: Alan Cox Date: Sat, 23 May 2009 07:58:56 +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: r192628 - head/sys/mips/mips 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: Sat, 23 May 2009 07:58:56 -0000 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