kernel - Improve spinlock performance
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 17 Mar 2018 08:28:56 +0000 (01:28 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 17 Mar 2018 08:31:36 +0000 (01:31 -0700)
commitae4025a1ef80a757584210f223107dfd989e9506
treea6defa18dd18b99632feeeb6f4111143ddd20c32
parent49d97f8b784b96497263cdeaec7fe48dc43c7648
kernel - Improve spinlock performance

* Primarily improve spinlock performance when transitioning
  from an exclusive to a shared lock by allowing atomic_fetchadd_int()
  to be used instead of atomic_cmpset_int().

* Also clean up a few remaining atomic_cmpset_int() cases that
  can use atomioc_fcmpset_int() instead.

Suggested-by: mjg
sys/kern/kern_spinlock.c