kernel - Fix rare IPIQ freezes
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 29 Jul 2011 08:25:46 +0000 (01:25 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 29 Jul 2011 08:25:46 +0000 (01:25 -0700)
commitda0b0e8b56caa72ea92647df9f1a7c5663384fe2
tree403f2ee93e93ea3148f0d294098876784024e600
parentaa56bc86de90a38efb257081b2227934e132b83b
kernel - Fix rare IPIQ freezes

* Ensure that an IPI interrupt is sent went waiting for an IPIQ
  to drain.  The IPIQ can be pushed up by passive IPIs and not
  necessarily have a signal pending on the target cpu, so we
  have to put the check in our drain loop rather than outside
  the loop.

* Add a cpu_pause() to reduce power use for the IPIQ drain case.

* Normalize the use of gd_intr_nesting_level and clean up the
  code syntax for the ipiq_optimized case.

* Remove the previous temporary IPI interrupt signaling fix, it
  was incomplete.

* Fix a missing crit_exit() in the ENOENT case for
  lwkt_send_ipiq3_nowait().

* Track cpu's which are in the middle of ipiq processing and
  assert that a cpu is not in an IPIQ processing loop when
  switching between threads.

* Normalize the use of ip->ip_npoll in the IPIQ code.  This
  field is used to avoid unnecessary IPI interrupts.
sys/kern/lwkt_ipiq.c
sys/kern/lwkt_thread.c
sys/platform/vkernel64/x86_64/cpu_regs.c
sys/platform/vkernel64/x86_64/mp.c
sys/sys/globaldata.h