freebsd-dev/sys/conf
Attilio Rao 651175c9db Introduce support for adaptive spinning in lockmgr.
Actually, as it did receive few tuning, the support is disabled by
default, but it can opt-in with the option ADAPTIVE_LOCKMGRS.
Due to the nature of lockmgrs, adaptive spinning needs to be
selectively enabled for any interested lockmgr.
The support is bi-directional, or, in other ways, it will work in both
cases if the lock is held in read or write way.  In particular, the
read path is passible of further tunning using the sysctls
debug.lockmgr.retries and debug.lockmgr.loops .  Ideally, such sysctls
should be axed or compiled out before release.

Addictionally note that adaptive spinning doesn't cope well with
LK_SLEEPFAIL.  The reason is that many (and probabilly all) consumers
of LK_SLEEPFAIL are mainly interested in knowing if the interlock was
dropped or not in order to reacquire it and re-test initial conditions.
This directly interacts with adaptive spinning because lockmgr needs
to drop the interlock while spinning in order to avoid a deadlock
(further details in the comments inside the patch).

Final note: finding someone willing to help on tuning this with
relevant workloads would be either very important and appreciated.

Tested by:	jeff, pho
Requested by:	many
2009-06-17 01:55:42 +00:00
..
defines
files Add cas(4), a driver for Sun Cassini/Cassini+ and National Semiconductor 2009-06-15 18:22:41 +00:00
files.amd64
files.arm
files.i386
files.ia64
files.mips
files.pc98
files.powerpc Initial version of the sec(4) driver for the integrated security engine found 2009-06-06 09:37:55 +00:00
files.sparc64
files.sun4v
kern.mk
kern.post.mk
kern.pre.mk
kmod_syms.awk
kmod.mk
ldscript.amd64
ldscript.arm
ldscript.i386
ldscript.ia64
ldscript.mips
ldscript.mips.cfe
ldscript.powerpc
ldscript.sparc64
Makefile.amd64
Makefile.arm
Makefile.i386
Makefile.ia64
Makefile.mips
Makefile.pc98
Makefile.powerpc
Makefile.sparc64
Makefile.sun4v
makeLINT.mk
makeLINT.sed
newvers.sh
NOTES Add cas(4), a driver for Sun Cassini/Cassini+ and National Semiconductor 2009-06-15 18:22:41 +00:00
options Introduce support for adaptive spinning in lockmgr. 2009-06-17 01:55:42 +00:00
options.amd64
options.arm
options.i386
options.ia64
options.mips
options.pc98
options.powerpc
options.sparc64
options.sun4v
systags.sh