git: kernel - Rewrite the callout API, major structural changes

Matthew Dillon dillon at
Sun Nov 15 11:45:22 PST 2020

commit fac0eb3cf4c969cfb8eab610321bd0b712266d62
Author: Matthew Dillon <dillon at>
Date:   Fri Nov 13 14:38:04 2020 -0800

    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.

Summary of changes:
 sys/kern/kern_clock.c   |   1 +
 sys/kern/kern_synch.c   |  13 +-
 sys/kern/kern_timeout.c | 889 ++++++++++++++++++++----------------------------
 sys/sys/callout.h       |  59 ++--
 sys/sys/exislock.h      | 194 +----------
 sys/sys/exislock2.h     | 227 +++++++++++++
 6 files changed, 644 insertions(+), 739 deletions(-)
 create mode 100644 sys/sys/exislock2.h

DragonFly BSD source repository

More information about the Commits mailing list