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

git: kernel - Use pool tokens to protect unix domain PCBs


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 Sep 2012 09:14:25 -0700 (PDT)

commit 524d0e3c7c3041d91aaa8a6f0d1efa4623c0f413
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Fri Sep 14 09:10:06 2012 -0700

    kernel - Use pool tokens to protect unix domain PCBs
    
    * The read, status, and write paths now use per-pcb pool tokens
      instead of the global unp_token.  The global token is still used
      for accept, connect, disconnect, etc.
    
    * General semantics for making this SMP safe is to obtain a pointer
      to the unp from so->so_pcb, then obtain the related pool token,
      then re-check that so->so_pcb still equals unp.
    
    * Pool token protects the peer pointer, unp->unp_conn.  Any change
      to unp->unp_conn requires both the pool token and the global token.
    
    * This should improve concurrent reading and writing w/unix domain
      sockets.

Summary of changes:
 sys/kern/uipc_usrreq.c |  179 +++++++++++++++++++++++++++++++++++++----------
 1 files changed, 141 insertions(+), 38 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/524d0e3c7c3041d91aaa8a6f0d1efa4623c0f413


-- 
DragonFly BSD source repository



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