kernel - Fix excessive ipiq recursion (4)
commit7fb451cb3c27563ba7a952e347f9a12cc68a9a9c
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 23 Jul 2016 04:58:59 +0000 (22 21:58 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 23 Jul 2016 04:58:59 +0000 (22 21:58 -0700)
tree95bd55344b122c733d580ee82621967729369f62
parente47e3dba268d93966c871dfaa6cbbca79038d5bb
kernel - Fix excessive ipiq recursion (4)

* Possibly the smoking gun.  There was a case where the lwkt_switch()
  code could wind up looping excessively calling lwkt_getalltokens()
  if td_contended went negative, and td_contended on interrupt threads
  could in-fact go negative.

  This stopped IPIs in their tracks.

* Fix by making td_contended unsigned, causing the comparions to work
  in all situations.  And add a missing assignment to 0 for the
  preempted thread case.
sys/kern/lwkt_thread.c
sys/sys/thread.h