summaryrefslogtreecommitdiffstats
path: root/share/man
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2009-06-17 01:55:42 +0000
committerattilio <attilio@FreeBSD.org>2009-06-17 01:55:42 +0000
commit256667d4fb0895491d2f4daee6026cc1004cf02d (patch)
tree398a4ccff0bd28e8c2b749758c6f3385162567ad /share/man
parent16341b1b276e5dc4622929cac5ddfd181067070e (diff)
downloadFreeBSD-src-256667d4fb0895491d2f4daee6026cc1004cf02d.zip
FreeBSD-src-256667d4fb0895491d2f4daee6026cc1004cf02d.tar.gz
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
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man9/lock.95
1 files changed, 4 insertions, 1 deletions
diff --git a/share/man/man9/lock.9 b/share/man/man9/lock.9
index d2edc0e..c94612a 100644
--- a/share/man/man9/lock.9
+++ b/share/man/man9/lock.9
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 05, 2009
+.Dd June 16, 2009
.Dt LOCK 9
.Os
.Sh NAME
@@ -96,6 +96,9 @@ The timeout value passed to
.It Fa flags
The flags the lock is to be initialized with:
.Bl -tag -width ".Dv LK_CANRECURSE"
+.It Dv LK_ADAPTIVE
+Enable adaptive spinning for this lock if the kernel is compiled with the
+ADAPTIVE_LOCKMGRS option.
.It Dv LK_CANRECURSE
Allow recursive exclusive locks.
.It Dv LK_NOPROFILE
OpenPOWER on IntegriCloud