kernel - Correct second edge-case for machdep.pmap_mmu_optimize
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 13 Mar 2014 16:25:29 +0000 (09:25 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 13 Mar 2014 16:25:29 +0000 (09:25 -0700)
commite3e69557a4979cb4d54d2361cc8a158eff082611
treef42d92bd48694360b0ae0d327b30cbb912fb56dc
parent1c9d98d011e8feb81b9e5b37a47dff656fa89f3e
kernel - Correct second edge-case for machdep.pmap_mmu_optimize

* The pmap_release*() code was previously optimized to not invalidate
  on pml4, pdp, pd, or pt pte's, only on terminal ptes.  This invalidation
  interferes with the PT replacement that the pmap_mmu_optimize feature
  uses.

* The bug generally would only occur when memory is mmap()'d and munmap()'d
  multiple times, which something like postgres will not do, but which
  rtorrent and other programs will do.

* Correctly invalidate page tables (use invltlb) when PT pte's are replaced.

* Requires further testing.  Default for this feature is still off.
sys/platform/pc64/x86_64/pmap.c