Page MenuHomeFreeBSD

Add COUNTER_U64_SYSINIT().
ClosedPublic

Authored by markj on Mar 5 2020, 7:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 3:53 AM
Unknown Object (File)
Nov 26 2023, 5:09 AM
Unknown Object (File)
Nov 25 2023, 3:26 AM
Unknown Object (File)
Nov 22 2023, 1:13 PM
Unknown Object (File)
Nov 22 2023, 1:13 PM
Unknown Object (File)
Nov 22 2023, 1:03 PM
Unknown Object (File)
Nov 22 2023, 12:58 PM
Unknown Object (File)
Nov 18 2023, 5:34 PM
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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib added inline comments.
sys/sys/counter.h
78 ↗(On Diff #69234)

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 ↗(On Diff #69234)

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