git: vkernel - Fix deadlocks with cothread locks
Matthew Dillon
dillon at crater.dragonflybsd.org
Fri Aug 27 17:24:00 PDT 2010
commit 68b3ccd46fc416a468da709a847cefe4c5cd3cef
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Fri Aug 27 17:12:01 2010 -0700
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.
Summary of changes:
sys/dev/virtual/disk/vdisk.c | 15 ++-
sys/dev/virtual/net/if_vke.c | 188 +++++++++++++++-------------
sys/kern/kern_intr.c | 3 +-
sys/platform/vkernel/platform/cothread.c | 19 ++-
sys/platform/vkernel64/platform/cothread.c | 19 ++-
5 files changed, 138 insertions(+), 106 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/68b3ccd46fc416a468da709a847cefe4c5cd3cef
--
DragonFly BSD source repository
More information about the Commits
mailing list