]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
Adaptive spinning for locking primitives, in read-mode, have some tuning
authorattilio <attilio@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 9 Sep 2009 09:34:13 +0000 (09:34 +0000)
committerattilio <attilio@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 9 Sep 2009 09:34:13 +0000 (09:34 +0000)
commit2d8b0de048a942d9d4ac4aac4e9a5f34abe3649a
tree6aecf8b9eb00316bd26f71fedbb5f225ac42bd8e
parent68fd75a8884ff134c4cb91824bd165ac0d29782b
Adaptive spinning for locking primitives, in read-mode, have some tuning
SYSCTLs which are inappropriate for a daily use of the machine (mostly
useful only by a developer which wants to run benchmarks on it).
Remove them before the release as long as we do not want to ship with
them in.

Now that the SYSCTLs are gone, instead than use static storage for some
constants, use real numeric constants in order to avoid eventual compiler
dumbiness and the risk to share a storage (and then a cache-line) among
CPUs when doing adaptive spinning together.

Pleasse note that the sys/linker_set.h inclusion in lockmgr and sx lock
support could have been gone, but re@ preferred them to be in order to
minimize the risk of problems on future merging.

Please note that this patch is not a MFC, but an 'edge case' as commit
directly to stable/8, which creates a diverging from HEAD.

Tested by:      Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197024 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_lock.c
sys/kern/kern_rwlock.c
sys/kern/kern_sx.c