Optimize lwkt_send_ipiq() - the IPI based inter-cpu messaging routine.
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 13 Apr 2005 04:00:56 +0000 (04:00 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 13 Apr 2005 04:00:56 +0000 (04:00 +0000)
commit4c9f5a7fe0c22e319f6f9d4a34f042864a26e09e
treea4efddf909760e983ebcb0c4306cb42bc4d79224
parent905fbe6b9ede077002c5316c71ba50c68dbd0f77
Optimize lwkt_send_ipiq() - the IPI based inter-cpu messaging routine.

* Add a passive version which does not initiate any actual hardware IPI.
  The message will be handled the next time the target cpu polls the
  queue (on each tick typically).  Adjust the free() path to use this
  version when freeing memory owned by another cpu.

* Add an interlock to avoid reissuing and unnecessarily stalling on
  the hardware IPI if a prior hardware IPI to the target cpu has not
  yet completed processing.

  This feature theoretically means that two cpus can tightly couple a
  large number of pipelined messages with only a single actual IPI being
  sent.

* Reorganize the hystersis points in the IPIQ FIFOs.

* Change a token livelock warning into a panic if it occurs 10 times in
  a row.

* Add a call to lwkt_process_ipiq() just after the AP startup code enables
  a cpu, to process any messages that might have built up during startup.
  There shouldn't be any, but this may avoid surprises later.
sys/cpu/i386/include/atomic.h
sys/i386/i386/mp_machdep.c
sys/i386/include/atomic.h
sys/kern/kern_slaballoc.c
sys/kern/lwkt_ipiq.c
sys/kern/lwkt_token.c
sys/platform/pc32/i386/mp_machdep.c
sys/sys/thread.h