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

git: kernel - Fix latency issue with many cores contending on a token


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 18 Oct 2011 21:11:03 -0700 (PDT)

commit 7ab91d55c3e8140456098245bcbedc93a36e4e4b
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Tue Oct 18 21:06:49 2011 -0700

    kernel - Fix latency issue with many cores contending on a token
    
    * Fix a latency issue when many cores are contending on the same token.
      This can be tested e.g. by setting an interface to use polling mode
      and then pinging it from the outside.  Ping times in excess of 60 seconds
      (yes, seconds!) could occur.
    
    * The problem turns out to be in usched_bsd4.c in the loop that tries to
      acquire the current process designation.  This loop runs in a critical
      section (and probably its caller too) and while it checks for the
      LWKT thread reschedule flag it fails to call splz() to process pending
      interrupts (like IPIs) that might SET the flag.
    
      Adding a single splz() prior to the lwkt reschedule check greatly
      reduces the latency problem.

Summary of changes:
 sys/kern/usched_bsd4.c          |   12 ++++-
 sys/platform/pc64/x86_64/pmap.c |   87 ++++++++++++++++++++------------------
 2 files changed, 55 insertions(+), 44 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7ab91d55c3e8140456098245bcbedc93a36e4e4b


-- 
DragonFly BSD source repository



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