vkernel - Fix deadlocks with cothread locks
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Aug 2010 00:12:01 +0000 (17:12 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Aug 2010 00:12:01 +0000 (17:12 -0700)
commit68b3ccd46fc416a468da709a847cefe4c5cd3cef
tree851c282215b58c734e806d263308135f53478e9a
parentc57248528eb11d4c5d4fadfdac323e3d4eb3d424
vkernel - Fix deadlocks with cothread locks

* Callbacks into the main kernel are not allowed when holding a cothread
  lock as this could cause a deadlock between cpus.  If the callback into
  the kernel blocks the cothread lock, being a pthreads lock,
  remains locked.

* Refactor the network and disk pipeline to hold the cothread lock for
  a much shorter period of time, allowing data to be pipelined without
  any stall conditions.

* For vknet if the tx mbuf return fifo is full we wait until it isn't.
sys/dev/virtual/disk/vdisk.c
sys/dev/virtual/net/if_vke.c
sys/kern/kern_intr.c
sys/platform/vkernel/platform/cothread.c
sys/platform/vkernel64/platform/cothread.c