kernel - Refactor Xinvltlb a little, turn off the idle-thread invltlb opt
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 24 Jul 2016 02:19:46 +0000 (19:19 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 24 Jul 2016 02:19:46 +0000 (19:19 -0700)
commit1a5c7e0f9aa6bc9a632a92b6b832cfe676746f7f
treef7fe6cc62c42302e9299e417e0dbd69e1fda14e2
parent237baba39c2144701eb483e7ec726a8a1aafa215
kernel - Refactor Xinvltlb a little, turn off the idle-thread invltlb opt

* Turn off the idle-thread invltlb optimization.  This feature can be
  turned on with a sysctl (default-off) machdep.optimized_invltlb.  It
  will be turned on by default when we've life-tested that it works
  properly.

* Remove excess critical sections and interrupt disablements.  All entries
  into smp_invlpg() now occur with interrupts already disabled and the
  thread already in a critical section.  This also defers critical-section
  1->0 transition handling away from smp_invlpg() and into its caller.

* Refactor the Xinvltlb APIs a bit.  Have Xinvltlb enter the critical
  section (it didn't before).  Remove the critical section from
  smp_inval_intr().  The critical section is now handled by the assembly,
  and by any other callers.

* Add additional tsc-based loop/counter debugging to try to catch problems.

* Move inner-loop handling of smp_invltlb_mask to act on invltlbs a little
  faster.

* Disable interrupts a little later inside pmap_inval_smp() and
  pmap_inval_smp_cmpset().
sys/platform/pc64/apic/apic_vector.s
sys/platform/pc64/include/pmap_inval.h
sys/platform/pc64/x86_64/machdep.c
sys/platform/pc64/x86_64/mp_machdep.c
sys/platform/pc64/x86_64/pmap_inval.c