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)
Nov 13 2025, 11:44 AM
Unknown Object (File)
Nov 10 2025, 1:11 AM
Unknown Object (File)
Nov 2 2025, 12:50 AM
Unknown Object (File)
Oct 29 2025, 8:28 AM
Unknown Object (File)
Oct 21 2025, 12:41 AM
Unknown Object (File)
Oct 21 2025, 12:41 AM
Unknown Object (File)
Oct 20 2025, 2:54 PM
Unknown Object (File)
Oct 10 2025, 3:34 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