kernel - Improve spinlock performance a bit
commit9abb66c539ab08f4f52889cf0a6f032797db052e
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 17 Apr 2018 04:27:14 +0000 (16 21:27 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 17 Apr 2018 04:27:14 +0000 (16 21:27 -0700)
tree085775d46727aedfa1494118917413c23b19ccc0
parent6836202ae0b81869e096204d5b201fedf45284f1
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_
sys/kern/kern_spinlock.c