git: kernel - Major MPSAFE Infrastructure 2

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Aug 27 17:24:02 PDT 2010


commit c57248528eb11d4c5d4fadfdac323e3d4eb3d424
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Aug 27 01:55:46 2010 -0700

    kernel - Major MPSAFE Infrastructure 2
    
    * Refactor buffer cache code which assumes content-stable data across
      a non-blocking BUF_LOCK().  This is no longer true.  The content must
      be reverified after the BUF_LOCK() succeeds.
    
    * Make setting and clearing B_DELWRI atomic with buffer reassignment.
    
    * Release cached mplock when looping in the scheduler and run
      check_splz() to avoid livelocking cpus.
    
    * Refactor the mplock contention handling code to handle both the mplock
      and token contention.  Generate a 2uS delay for all but one cpu to
      try to avoid livelocks.
    
    * Do not splz() from inside a spinlock, it will just panic.
    
    * Fix the token description field for 'systat -pv 1'.
    
    * Optimize MP_LOCK macros a bit.

Summary of changes:
 sys/kern/kern_mplock.c                   |    8 +-
 sys/kern/kern_spinlock.c                 |    1 -
 sys/kern/kern_umtx.c                     |    2 +
 sys/kern/lwkt_thread.c                   |   77 ++++++++++---
 sys/kern/lwkt_token.c                    |    1 +
 sys/kern/vfs_bio.c                       |  126 ++++++++++++----------
 sys/kern/vfs_subr.c                      |  176 +++++++++++++++++++----------
 sys/kern/vfs_vm.c                        |   87 +++++++++------
 sys/platform/pc32/i386/machdep.c         |   18 ++-
 sys/platform/pc32/isa/clock.c            |    1 +
 sys/platform/pc64/isa/clock.c            |    1 +
 sys/platform/pc64/x86_64/machdep.c       |    9 +-
 sys/platform/vkernel/i386/cpu_regs.c     |   38 +++++--
 sys/platform/vkernel64/x86_64/cpu_regs.c |   23 +++-
 sys/sys/mplock2.h                        |   28 +++--
 15 files changed, 387 insertions(+), 209 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c57248528eb11d4c5d4fadfdac323e3d4eb3d424


-- 
DragonFly BSD source repository





More information about the Commits mailing list