kernel - Fix Xinvltlb issue, fix ipiq issue, add Xsniff
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 20 Jul 2016 00:14:33 +0000 (17:14 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 20 Jul 2016 00:26:19 +0000 (17:26 -0700)
commite32d324453609358a4f48c324b3216c69a6c5c4b
treecfa37d98aad4da5e7faf4f1e020cecfe1f7a1ac1
parent01693c34ec9e175a7a9dd3e3576d93e4d3ee36c7
kernel - Fix Xinvltlb issue, fix ipiq issue, add Xsniff

* The Xinvltlb IPI interrupt enables interrupts in smp_inval_intr(), which
  allows potentially pending interrupts and other things to happen.  We
  must use doreti instead of doreti_iret.

* Fix a reentrancy issue with lwkt_ipiq.  Reentrancy can occur when the ipi
  callback itself needs to issue an IPI, but the target cpu FIFO is full.
  When this happens, the cpu mask may not be correct so force a scan of all
  cpus in this situation.

* Add an infinite loop detection test to lwkt_process_ipiq() and jigger
  another IPI if it persists more than 10 seconds, hopefully recovering the
  system if as-yet unknown IPI issues persist.

* Add the Xsniff IPI and augment systat -pv to use it.  This sniffs the %rip
  and %rpc on all cpus, allowing us to see where where the kernel spends its
  time.
15 files changed:
sys/cpu/x86_64/include/cpufunc.h
sys/kern/kern_clock.c
sys/kern/lwkt_ipiq.c
sys/kern/lwkt_thread.c
sys/platform/pc64/apic/apic_vector.s
sys/platform/pc64/apic/lapic.c
sys/platform/pc64/include/intr_machdep.h
sys/platform/pc64/x86_64/genassym.c
sys/platform/pc64/x86_64/global.s
sys/platform/pc64/x86_64/mp_machdep.c
sys/platform/vkernel64/platform/pmap_inval.c
sys/sys/globaldata.h
sys/sys/kinfo.h
usr.bin/systat/symbols.c
usr.bin/systat/vmmeter.c