kernel - Fix excessive ipiq recursion
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 20 Jul 2016 06:56:15 +0000 (23:56 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 20 Jul 2016 06:56:15 +0000 (23:56 -0700)
commitddec9f484d4ca98343162d53318a07db41f7c43a
treeeb8dd294984cda0435107d0247f6f17d855938f7
parente32d324453609358a4f48c324b3216c69a6c5c4b
kernel - Fix excessive ipiq recursion

* Fix a situation where excessive IPIQ recursion can occur.  The problem
  was revealed by the previous commit when the passive signalling mechanism
  was changed.

* Passive IPI sends now signal at 1/4 full.

* Active IPI sends wait for the FIFO to be < 1/2 full only when the nesting
  level is 0, otherwise they allow it to become almost completely full.
  This effectively gives IPI callbacks a buffer of roughly 1/2 the FIFO in
  which they can issue IPI sends without triggering the wait-process loop
  (which is the cause of the nesting).

  IPI callbacks do not usually send more than one or two IPI sends to any
  given cpu target which should theoretically guarantee that excessive
  stacking will not occur.

Reported-by: marino
sys/kern/lwkt_ipiq.c