git: kernel - Improve spinlock performance a bit

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Apr 16 21:38:35 PDT 2018


commit 9abb66c539ab08f4f52889cf0a6f032797db052e
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Apr 16 21:27:14 2018 -0700

    kernel - Improve spinlock performance a bit
    
    * Rearrange indefinite_init() and cpu_pause() in _spin_lock_contested()
      and _spin_lock_shared_contested() to improve performance.
    
    * Fix conditional clearing the SHARED bit to use ovalue intead of
      value.  After review, either can be used but ovalue is more
      appropriate and give us an interlock against SPINLOCK_EXCLWAIT.
    
    Reported-by: mjg_

Summary of changes:
 sys/kern/kern_spinlock.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9abb66c539ab08f4f52889cf0a6f032797db052e


-- 
DragonFly BSD source repository


More information about the Commits mailing list