From owner-svn-src-user@FreeBSD.ORG Sat Apr 24 22:01:15 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A133C1065672; Sat, 24 Apr 2010 22:01:15 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77F7C8FC2B; Sat, 24 Apr 2010 22:01:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3OM1F9K058735; Sat, 24 Apr 2010 22:01:15 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3OM1FCO058733; Sat, 24 Apr 2010 22:01:15 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201004242201.o3OM1FCO058733@svn.freebsd.org> From: Kip Macy Date: Sat, 24 Apr 2010 22:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207164 - user/kmacy/head_page_lock_2/sys/amd64/amd64 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Apr 2010 22:01:15 -0000 Author: kmacy Date: Sat Apr 24 22:01:15 2010 New Revision: 207164 URL: http://svn.freebsd.org/changeset/base/207164 Log: - lock page that we're holding in pmap_extract_and_hold - remove stale pmap_collect comment suggested by: kib@ - remove extra white space before pmap_remove_pte Modified: user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c Modified: user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c ============================================================================== --- user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c Sat Apr 24 21:36:52 2010 (r207163) +++ user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c Sat Apr 24 22:01:15 2010 (r207164) @@ -1300,7 +1300,8 @@ retry: if (pdep != NULL && (pde = *pdep)) { if (pde & PG_PS) { if ((pde & PG_RW) || (prot & VM_PROT_WRITE) == 0) { - if (pa_tryrelock(pmap, pde & PG_PS_FRAME, &pa)) + if (pa_tryrelock(pmap, (pde & PG_PS_FRAME) | + (va & PDRMASK), &pa)) goto retry; m = PHYS_TO_VM_PAGE((pde & PG_PS_FRAME) | @@ -2356,7 +2357,6 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); vm_page_unlock(m); } while (va < va_last); - } /* @@ -2599,12 +2599,9 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t /* * Demote the pv entry. This depends on the earlier demotion - * of the mapping. Specifically, the (re)creation of a per- - * page pv entry might trigger the execution of pmap_collect(), - * which might reclaim a newly (re)created per-page pv entry - * and destroy the associated mapping. In order to destroy - * the mapping, the PDE must have already changed from mapping - * the 2mpage to referencing the page table page. + * of the mapping. In order to destroy the mapping, the PDE + * must have already changed from mapping the 2mpage to + * referencing the page table page. */ if ((oldpde & PG_MANAGED) != 0) pmap_pv_demote_pde(pmap, va, oldpde & PG_PS_FRAME, pv_list); @@ -2688,7 +2685,6 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t return (pmap_unuse_pt(pmap, sva, *pmap_pdpe(pmap, sva), free)); } - /* * pmap_remove_pte: do the things to unmap a page in a process */