Page MenuHomeFreeBSD

Add COUNTER_U64_SYSINIT().
ClosedPublic

Authored by markj on Mar 5 2020, 7:11 PM.
Tags
None
Referenced Files
F133115346: D23977.id69274.diff
Thu, Oct 23, 2:40 AM
F133115345: D23977.id.diff
Thu, Oct 23, 2:40 AM
F133115338: D23977.id69234.diff
Thu, Oct 23, 2:40 AM
F133078150: D23977.diff
Wed, Oct 22, 6:48 PM
Unknown Object (File)
Sun, Oct 5, 1:14 PM
Unknown Object (File)
Sun, Sep 28, 2:28 PM
Unknown Object (File)
Sep 14 2025, 10:14 AM
Unknown Object (File)
Sep 11 2025, 6:57 AM
Subscribers

Details

Summary

This is the same idea as MTX_SYSINIT and friends: register a global
counter for initialization when the counter(9) subsystem is ready,
instead of having to write a custom sysinit function.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29814
Build 27642: arc lint + arc unit

Event Timeline

kib added inline comments.
sys/sys/counter.h
78

I am somewhat curious about selection of the si_sub there.

This revision is now accepted and ready to land.Mar 5 2020, 9:25 PM
sys/sys/counter.h
78

It is just inherited from the existing sysinits which initialize counters. It could be moved earlier, I think the only prerequisite is that the pcpu zones are initialized.

  • Add COUNTER_U64_DEFINE_EARLY.
  • Add SI_SUB_COUNTER to make initialization ordering more explicit.
This revision now requires review to proceed.Mar 6 2020, 3:53 PM
This revision is now accepted and ready to land.Mar 6 2020, 4:22 PM