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

git: kernel - Refactor kqueue interlocks


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 6 Sep 2010 18:48:17 -0700 (PDT)

commit 4371bb25c4dc6be21df04e7de72b65682ca9f4c4
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Mon Sep 6 18:44:03 2010 -0700

    kernel - Refactor kqueue interlocks
    
    * Make KN_PROCESSING a soft lock flag.  When set nobody else can mess
      with a particular knote (other than setting certain flags) even if
      the originator blocks.
    
    * Interlock major processing with KN_PROCESSING.  Registration, event
      scan, knote(), deletion, and filter ops.
    
    * Block & restart when conflicts occur.  For the knote() hot-path we only
      block and restart if the 'hint' is non-zero, otherwise we just flag with
      KN_REPROCESS to indicate that reprocessing is required.
    
    * This should fix kqueue races related to blocking operations confusing
      the list scan.
    
    * Document the shit out of everything.
    
    Reported-by: Francois Tigeot <ftigeot@wolfpond.org>

Summary of changes:
 sys/kern/kern_event.c |  344 +++++++++++++++++++++++++++++++++++--------------
 sys/sys/event.h       |   18 ++-
 2 files changed, 255 insertions(+), 107 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4371bb25c4dc6be21df04e7de72b65682ca9f4c4


-- 
DragonFly BSD source repository



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