svn commit: r207164 - user/kmacy/head_page_lock_2/sys/amd64/amd64
Kip Macy
kmacy at FreeBSD.org
Sat Apr 24 22:01:15 UTC 2010
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
*/
More information about the svn-src-user
mailing list