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

git: kernel - Fix MP system call performance regression


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Dec 2010 00:01:06 -0800 (PST)

commit 911d4144e391f5518957ca6012034414c8226203
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Thu Dec 9 23:53:44 2010 -0800

    kernel - Fix MP system call performance regression
    
    * The userland scheduler was unconditionally calling lwkt_switch()
      via userexit() (i.e. on every system call), creating unnecessary
      overhead and possibly also triggering a bsd4 scheduler event
      requiring a common spinlock.
    
    * Rearrange the code slightly to reduce instances where lwkt_switch()
      is called.  We want to try to keep instances where a higher priority
      LWKT thread is potentially runnable or when the LWKT fairq accumulator
      for the current thread has been exhausted.
    
    * This removes system call overhead multiplication on MP systems.  For
      example, on a 48-core box system call overhead when all 48 cpus are
      busy doing getuid() loops went from 10uS back down to 270nS (which
      is near the single-cpu test results).

Summary of changes:
 sys/kern/usched_bsd4.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/911d4144e391f5518957ca6012034414c8226203


-- 
DragonFly BSD source repository



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