kernel - Refactor smp collision statistics
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 5 Oct 2017 04:46:57 +0000 (21:46 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 16 Oct 2017 18:30:22 +0000 (11:30 -0700)
commit5b49787bf81ce6370fea5dfb5cde2d0dddc5c13b
treefd8e4f78162fd7ebe7a0ed6ed4f7174918f84ae6
parent118ce231a81111ce55a8db194ff2770c74fcdf79
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:
sys/cpu/x86_64/include/cpufunc.h
sys/kern/kern_clock.c
sys/kern/kern_lock.c
sys/kern/kern_mutex.c
sys/kern/kern_spinlock.c
sys/kern/lwkt_thread.c
sys/kern/lwkt_token.c
sys/net/altq/altq_subr.c
sys/platform/pc64/apic/lapic.c
sys/platform/pc64/include/clock.h
sys/platform/pc64/isa/clock.c
sys/platform/pc64/x86_64/mp_machdep.c
sys/platform/pc64/x86_64/pmap_inval.c
sys/platform/pc64/x86_64/trap.c
sys/platform/vkernel64/include/clock.h
sys/platform/vkernel64/platform/init.c
sys/sys/buf2.h
sys/sys/indefinite.h [copied from sys/sys/microtime_pcpu.h with 65% similarity]
sys/sys/indefinite2.h [new file with mode: 0644]
sys/sys/lock.h
sys/sys/microtime_pcpu.h
sys/sys/mutex.h
sys/sys/mutex2.h
sys/sys/thread.h
sys/sys/time.h
sys/vfs/nfs/nfs_vfsops.c