svn commit: r334397 - head/sys/i386/i386
Konstantin Belousov
kib at FreeBSD.org
Wed May 30 20:24:22 UTC 2018
Author: kib
Date: Wed May 30 20:24:21 2018
New Revision: 334397
URL: https://svnweb.freebsd.org/changeset/base/334397
Log:
Avoid unneccessary TLB shootdowns in pmap_unwire_ptp() for user pmaps,
which no longer create recursive page table mappings.
Benchmarked by: bde
Tested by: pho
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/i386/i386/pmap.c
Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c Wed May 30 20:16:17 2018 (r334396)
+++ head/sys/i386/i386/pmap.c Wed May 30 20:24:21 2018 (r334397)
@@ -1872,7 +1872,6 @@ pmap_unwire_ptp(pmap_t pmap, vm_page_t m, struct spgli
static void
_pmap_unwire_ptp(pmap_t pmap, vm_page_t m, struct spglist *free)
{
- vm_offset_t pteva;
/*
* unmap the page table page
@@ -1881,16 +1880,13 @@ _pmap_unwire_ptp(pmap_t pmap, vm_page_t m, struct spgl
--pmap->pm_stats.resident_count;
/*
- * Do an invltlb to make the invalidated mapping
- * take effect immediately.
+ * There is not need to invalidate the recursive mapping since
+ * we never instantiate such mapping for the usermode pmaps,
+ * and never remove page table pages from the kernel pmap.
+ * Put page on a list so that it is released since all TLB
+ * shootdown is done.
*/
- pteva = VM_MAXUSER_ADDRESS + i386_ptob(m->pindex);
- pmap_invalidate_page(pmap, pteva);
-
- /*
- * Put page on a list so that it is released after
- * *ALL* TLB shootdown is done
- */
+ MPASS(pmap != kernel_pmap);
pmap_add_delayed_free_list(m, free, TRUE);
}
More information about the svn-src-all
mailing list