diff options
author | attilio <attilio@FreeBSD.org> | 2010-01-09 01:46:38 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2010-01-09 01:46:38 +0000 |
commit | fde84f320b44c90f431d0a4145d7b83d2a221253 (patch) | |
tree | e46dd2a25d662a40bd7324ff4489431a2403931d /share | |
parent | da19d81aaa4a2ec26f7ad15e4c609a36f868e9e0 (diff) | |
download | FreeBSD-src-fde84f320b44c90f431d0a4145d7b83d2a221253.zip FreeBSD-src-fde84f320b44c90f431d0a4145d7b83d2a221253.tar.gz |
Introduce the new kernel thread called "deadlock resolver".
While the name is pretentious, a good explanation of its targets is
reported in this 17 months old presentation e-mail:
http://lists.freebsd.org/pipermail/freebsd-arch/2008-August/008452.html
In order to implement it, the sq_type in sleepqueues is mandatory and not
only compiled along with INVARIANTS option. Additively, a new sleepqueue
function, sleepq_type() is added, returning the type of the sleepqueue
linked to a wchan.
Three new sysctls are added in order to configure the thread:
debug.deadlkres.slptime_threshold
debug.deadlkres.blktime_threshold
debug.deadlkres.sleepfreq
rappresenting the thresholds for sleep and block time that will lead to
a deadlock matching (when exceeded), while the sleepfreq rappresents the
number of seconds between 2 consecutive thread runnings.
In order to enable the deadlock resolver thread recompile your kernel
with the option DEADLKRES.
Reviewed by: jeff
Tested by: pho, Giovanni Trematerra
Sponsored by: Nokia Incorporated, Sandvine Incorporated
MFC after: 2 weeks
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/sleepqueue.9 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/share/man/man9/sleepqueue.9 b/share/man/man9/sleepqueue.9 index 36cab69..3c0e9a5 100644 --- a/share/man/man9/sleepqueue.9 +++ b/share/man/man9/sleepqueue.9 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2009 +.Dd January 8, 2010 .Dt SLEEPQUEUE 9 .Os .Sh NAME @@ -44,6 +44,7 @@ .Nm sleepq_sleepcnt , .Nm sleepq_timedwait , .Nm sleepq_timedwait_sig , +.Nm sleepq_type , .Nm sleepq_wait , .Nm sleepq_wait_sig .Nd manage the queues of sleeping threads @@ -84,6 +85,8 @@ .Fn sleepq_timedwait "void *wchan" .Ft int .Fn sleepq_timedwait_sig "void *wchan" "int signal_caught" +.Ft int +.Fn sleepq_type "void *wchan" .Ft void .Fn sleepq_wait "void *wchan" .Ft int @@ -366,6 +369,12 @@ given a .Fa wchan . .Pp The +.Fn sleepq_type +function returns the type of +.Fa wchan +associated to a sleepqueue. +.Pp +The .Fn sleepq_abort , .Fn sleepq_broadcast , and |