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

DragonFly-2.3.1.808.g880ffa master sys/kern sys_pipe.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 12 Jul 2009 22:25:00 -0700 (PDT)

commit 880ffa3a9be14e3d9608214aabd8db2e5e9238ae
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Sun Jul 12 22:14:43 2009 -0700

    pipe - replace use of DELAY() with a better solution, add features.
    
    * Use the new tsc functions to poll for new read data in a pipe for a short
      period of time on a SMP box.  This greatly increases the odds of a pipe
      writer on one cpu being able to pipeline data to a reader on another cpu
      without having to use an IPI or tsleep/wakeup.
    
      For the pipe1 test this brings the synchronous communications path
      over a pipe (Awrite, Bread, Bwrite, Aread) down from 7uS to around 2uS.
    
      For the pipe2 test this value greatly reduces the number of IPIs
      and improves bandwidth by a few hundred megabytes/sec (the old DELAY
      did the same thing so there is no change for the pipe2 test).
    
    * Add sysctl kern.pipe.delay which defaults to 5000 nanoseconds (5uS).
      This is the maximum a pipe reader will wait for additional data before
      falling back to tsleep/wakeup (and related ipis).  pipe_delay may be
      set to 0 to disable the function.  I value of at least 3000 is
      recomended.  Pipelining large buffers efficiently requires a higher value,
      say up to 8000 or so.
    
    * Allow kern.pipe.mpsafe to be set to 2 which adds a predictive wakeup
      when a writer is found to be stalled.  This currently has no significant
      effect on operations due to token collisions.
    
    * Add statistics: kern.pipe.wblocked and kern.pipe.rblocked, counting
      the number of times a pipe blocks in "pipewr" or "piperd".
    
    * Fix MP races in pipe_ioctl().

Summary of changes:
 sys/kern/sys_pipe.c |  119 +++++++++++++++++++++++++++++++++------------------
 1 files changed, 77 insertions(+), 42 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/880ffa3a9be14e3d9608214aabd8db2e5e9238ae


-- 
DragonFly BSD source repository



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