kernel - Refactor smp collision statistics
* Add an indefinite wait timing API (sys/indefinite.h,
sys/indefinite2.h). This interface uses the TSC and will
record lock latencies to our pcpu stats in microseconds.
The systat -pv 1 display shows this under smpcoll.
Note that latencies generated by tokens, lockmgr, and mutex
locks do not necessarily reflect actual lost cpu time as the
kernel will schedule other threads while those are blocked,
if other threads are available.
* Formalize TSC operations more, supply a type (tsc_uclock_t and
tsc_sclock_t).
* Reinstrument lockmgr, mutex, token, and spinlocks to use the new
indefinite timing interface.
26 files changed: