svn commit: r202829 - stable/7/sys/amd64/amd64
John Baldwin
jhb at FreeBSD.org
Fri Jan 22 20:30:54 UTC 2010
Author: jhb
Date: Fri Jan 22 20:30:54 2010
New Revision: 202829
URL: http://svn.freebsd.org/changeset/base/202829
Log:
MFC 189415:
Make pmap_copy() more TLB friendly. Specifically, make it use the kernel's
direct map instead of the pmap's recursive mapping to access the lowest
level in the page table.
Modified:
stable/7/sys/amd64/amd64/pmap.c
Directory Properties:
stable/7/sys/ (props changed)
stable/7/sys/cddl/contrib/opensolaris/ (props changed)
stable/7/sys/contrib/dev/acpica/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/7/sys/amd64/amd64/pmap.c Fri Jan 22 20:24:55 2010 (r202828)
+++ stable/7/sys/amd64/amd64/pmap.c Fri Jan 22 20:30:54 2010 (r202829)
@@ -3498,9 +3498,6 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm
if (dst_addr != src_addr)
return;
- if (!pmap_is_current(src_pmap))
- return;
-
vm_page_lock_queues();
if (dst_pmap < src_pmap) {
PMAP_LOCK(dst_pmap);
@@ -3562,14 +3559,16 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm
continue;
}
- srcmpte = PHYS_TO_VM_PAGE(srcptepaddr & PG_FRAME);
+ srcptepaddr &= PG_FRAME;
+ srcmpte = PHYS_TO_VM_PAGE(srcptepaddr);
KASSERT(srcmpte->wire_count > 0,
("pmap_copy: source page table page is unused"));
if (va_next > end_addr)
va_next = end_addr;
- src_pte = vtopte(addr);
+ src_pte = (pt_entry_t *)PHYS_TO_DMAP(srcptepaddr);
+ src_pte = &src_pte[pmap_pte_index(addr)];
while (addr < va_next) {
pt_entry_t ptetemp;
ptetemp = *src_pte;
More information about the svn-src-stable
mailing list