DragonFly BSD
DragonFly commits List (threaded) for 2010-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: vkernel - Fix deadlocks with cothread locks


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Aug 2010 17:23:41 -0700 (PDT)

commit 68b3ccd46fc416a468da709a847cefe4c5cd3cef
Author: Matthew Dillon <dillon@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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]