cvs commit: src/sys/amd64/include lock.h src/sys/conf files src/sys/i386/i386 machdep.c mp_machdep.c spinlock.s src/sys/i386/include atomic.h cpufunc.h lock.h src/sys/kern kern_spinlock.c src/sys/sys spinlock.h

Jeffrey Hsu hsu at crater.dragonflybsd.org
Sun Aug 28 08:29:08 PDT 2005


hsu         2005/08/28 08:27:06 PDT

DragonFly src repository

  Modified files:
    sys/amd64/include    lock.h 
    sys/conf             files 
    sys/i386/i386        machdep.c mp_machdep.c spinlock.s 
    sys/i386/include     atomic.h cpufunc.h lock.h 
  Added files:
    sys/kern             kern_spinlock.c 
    sys/sys              spinlock.h 
  Log:
  A machine-independent spinlock implementation.  It has the advantages of
    1.  being written in C except for the most low-level atomic swap primitive,
          which is universally supported on current processor architectures
    2.  having a very small inlined memory footprint for spin_lock(),
          with the slow-path defered to a subroutine call
    3.  only requiring a bus-locked operation for lock acquisition,
           and not requiring a bus-locked operation for lock release
    4.  doing a non-bus-locked check first in the spin loop to
          reduce bus contention
    5.  doing exponential backoff in the uncommon contested case, which
          Sun has found to reduce bus contention by a factor of 5 or more
  
  Reviewed by:	Matt Dillon
  
  Revision  Changes    Path
  1.3       +5 -10     src/sys/amd64/include/lock.h
  1.104     +1 -0      src/sys/conf/files
  1.77      +9 -9      src/sys/i386/i386/machdep.c
  1.37      +2 -2      src/sys/i386/i386/mp_machdep.c
  1.2       +3 -3      src/sys/i386/i386/spinlock.s
  1.14      +9 -0      src/sys/i386/include/atomic.h
  1.14      +7 -1      src/sys/i386/include/cpufunc.h
  1.12      +5 -10     src/sys/i386/include/lock.h


http://www.dragonflybsd.org/cvsweb/src/sys/amd64/include/lock.h.diff?r1=1.2&r2=1.3&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/conf/files.diff?r1=1.103&r2=1.104&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/machdep.c.diff?r1=1.76&r2=1.77&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/mp_machdep.c.diff?r1=1.36&r2=1.37&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/spinlock.s.diff?r1=1.1&r2=1.2&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/i386/include/atomic.h.diff?r1=1.13&r2=1.14&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/i386/include/cpufunc.h.diff?r1=1.13&r2=1.14&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/i386/include/lock.h.diff?r1=1.11&r2=1.12&f=u





More information about the Commits mailing list