kernel - Deal with lost IPIs (VM related)
commitbba35d66575dc3caadf7839245299cedfc7027b8
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 6 Sep 2016 00:11:05 +0000 (5 17:11 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 6 Sep 2016 00:11:05 +0000 (5 17:11 -0700)
treed167d11145836430b5dba243dd9e71c63968d688
parentebd4ceab76a6f161362029cbfd08efaedaab0519
kernel - Deal with lost IPIs (VM related)

* Some (all?) VMs appear to be able to lose IPIs.  Hopefully the same can't
  be said for device interrupts!  Add some recovery code for lost Xinvltlb
  IPIs for now.

  For synchronizing invalidations we use the TSC and run a recovery attempt
  after 1/16 second, and every 1 second there-after, if an Xinvltlb is not
  responded to (smp_invltlb() and smp_invlpg()).  The IPI will be re-issued.

* Some basic testing shows that a VM can stall out a cpu thread for an
  indefinite period of time, potentially causing the above watchdog to
  trigger.  Even so it should not have required re-issuing the IPI, but
  it seems it does, so the VM appears to be losing the IPI(!) when a cpu
  thread stalls out on the host!  At least with the VM we tested under,
  type unknown.

* IPIQ IPIs currently do not have any specific recovery but I think each
  cpu will poll for IPIQs slowly in the idle thread, so they might
  automatically recover anyway.

Reported-by: zach
sys/platform/pc64/x86_64/mp_machdep.c
sys/platform/pc64/x86_64/pmap_inval.c