Add counters for recording Token/MPlock contention, this would help in
authorHiten Pandya <hmp@dragonflybsd.org>
Thu, 7 Jul 2005 20:28:26 +0000 (20:28 +0000)
committerHiten Pandya <hmp@dragonflybsd.org>
Thu, 7 Jul 2005 20:28:26 +0000 (20:28 +0000)
commit387177972d15d6cf5bf20c88fdeb5331d183ba2c
tree9050f78e309a62b4bef4d1421b5111a6198cde24
parentd1060ff0ed8fd18594f5ad8b261e1a8cd76f6fb1
Add counters for recording Token/MPlock contention, this would help in
determining the number of times contention has occured in the system.

The contention counters have been made 64-bit quantities because they
are situated within a tight-loop.

KTR tracepoints have been added for marking start and stop of a token's
contention.  New field tr_flags added to struct lwkt_tokref.  By adding
tracepoints in lwkt_chktokens(9),  it gives us interesting data on MP
machines when it indirectly sends a passive IPI to the remote CPU for
gaining ownership of a token.  It would be interesting to see KTR dumps
for a 4-CPU or an 8-CPU system.

Discussed-with:  Matthew Dillon <dillon@apollo.backplane.com>
sys/kern/lwkt_thread.c
sys/kern/lwkt_token.c
sys/sys/thread.h
sys/sys/thread2.h