Page MenuHomeFreeBSD

FFclock: Making the FFclock's boottime parameter tick-safe
AcceptedPublic

Authored by Darryl.Veitch_uts.edu.au on Dec 7 2023, 12:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 3:34 AM
Unknown Object (File)
Sep 12 2025, 11:29 PM
Unknown Object (File)
Sep 6 2025, 8:29 PM
Unknown Object (File)
Aug 16 2025, 6:55 AM
Unknown Object (File)
Aug 15 2025, 12:40 AM
Unknown Object (File)
Aug 5 2025, 12:36 PM
Unknown Object (File)
Aug 3 2025, 7:10 PM
Unknown Object (File)
Jul 27 2025, 6:01 AM
Subscribers
None

Details

Reviewers
phk
imp
brooks
Summary

Context: The ffclock_boottime variable holds the UTC timestamp of system
boot for the FFclock. For the FFclock this is a global, whereas for the
FBclock the corresponding th_boottime is a per-tick quantity stored as a
member of timehands. The latter approach is superior as otherwise the
boottime value can be out of sync with other clock parameters across
ticks, for example after resets.

This commit re-engineers ffclock_boottime to be a per-tick variable
under fftimehands. The setting of its value sits naturally within the
tick update code in the reset_FBbootime branch of ffclock_windup.

For the reading of FFclocks, responsibility for FFLOCK_UPTIME flag
processing has been moved from kern_ffclock.c:ffclock_abstime, to
ffclock_last_tick and ffclock_convert_abs in kern_tc.c, where
fftimehands is accessible. Other changes are straightforward.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 54836
Build 51725: arc lint + arc unit