From owner-svn-src-head@FreeBSD.ORG Mon Aug 19 15:58:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 48731263; Mon, 19 Aug 2013 15:58:40 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35A6F2745; Mon, 19 Aug 2013 15:58:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7JFweBF022366; Mon, 19 Aug 2013 15:58:40 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7JFweiw022365; Mon, 19 Aug 2013 15:58:40 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201308191558.r7JFweiw022365@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 19 Aug 2013 15:58:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254535 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 19 Aug 2013 15:58:40 -0000 Author: raj Date: Mon Aug 19 15:58:39 2013 New Revision: 254535 URL: http://svnweb.freebsd.org/changeset/base/254535 Log: Simplify and clean up pmap_clearbit() There is no need for calling vm_page_dirty() when clearing "modified" flag as it is already set for that page in pmap_fault_fixup() or pmap_enter() thanks to "modified" bit emulation. Also, there is no need for checking PTE "referenced" or "writeable" flags. If there is a request to clear a particular flag we should just do it. Submitted by: Zbigniew Bodek Reviewed by: gber Sponsored by: The FreeBSD Foundation, Semihalf Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Mon Aug 19 15:51:30 2013 (r254534) +++ head/sys/arm/arm/pmap-v6.c Mon Aug 19 15:58:39 2013 (r254535) @@ -900,9 +900,6 @@ pmap_clearbit(struct vm_page *m, u_int m rw_wlock(&pvh_global_lock); - if (maskbits & PVF_WRITE) - maskbits |= PVF_MOD; - if (TAILQ_EMPTY(&m->md.pv_list)) { rw_wunlock(&pvh_global_lock); return (0); @@ -924,14 +921,12 @@ pmap_clearbit(struct vm_page *m, u_int m ptep = &l2b->l2b_kva[l2pte_index(va)]; npte = opte = *ptep; - if ((maskbits & (PVF_WRITE|PVF_MOD)) && L2_S_WRITABLE(opte)) { - vm_page_dirty(m); - + if (maskbits & (PVF_WRITE | PVF_MOD)) { /* make the pte read only */ npte |= L2_APX; } - if ((maskbits & PVF_REF) && L2_S_REFERENCED(opte)) { + if (maskbits & PVF_REF) { /* * Clear referenced flag in PTE so that we * will take a flag fault the next time the mapping