kernel - Rewrite the callout API, major structural changes
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 13 Nov 2020 22:38:04 +0000 (14:38 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 15 Nov 2020 19:45:09 +0000 (11:45 -0800)
commitfac0eb3cf4c969cfb8eab610321bd0b712266d62
tree2bca8ea0a3c955262dfa827bdd431d0d0c0e31ab
parent2b57e6df2e02e023cc8defd76c1809243c99e460
kernel - Rewrite the callout API, major structural changes

* Make struct callout much smaller, primarily now just containing
  a pointer to a shadow structure which is allocated on first use.

  The callout backend uses this shadow structure on the callout
  lists instead of the embedded struct callout.  This should reduce
  occurances of untraceable panics due to list corruption.  Instead,
  the callout-v-shadow structure linkages are validated with an assertion
  and if this panics it should be possible to determine which subsystem
  was responsible from the kernel core.

* tsleep() etc is used early in the boot sequence and use some
  bypass functions to streamline operations and avoid allocation
  calls.  This should also improve tsleep()s performance a bit over
  the original implementation.
sys/kern/kern_clock.c
sys/kern/kern_synch.c
sys/kern/kern_timeout.c
sys/sys/callout.h
sys/sys/exislock.h
sys/sys/exislock2.h [new file with mode: 0644]