Re: [PATCH] timekeeping: Document monotonic raw timestamps in snapshots correctly
From: Thomas Weißschuh
Date: Mon Jul 06 2026 - 05:32:49 EST
On Sun, Jul 05, 2026 at 02:38:04PM +0200, Thomas Gleixner wrote:
> The comments related to raw monotonic timestamps for the various
> snapshot mechanisms in code and struct documentation are ambiguous. They
> reference them as CLOCK_MONOTONIC_RAW timestamps, but with the arrival
> of AUX clocks that's not longer correct.
>
> The raw monotonic timestamps only represent CLOCK_MONOTONIC_RAW for the
> system time clock IDs, i.e. REALTIME, MONOTONIC, BOOTTIME, TAI.
>
> For AUX clocks they refer to the monotonic raw clock which is related to
> the individual AUX clocks. These monotonic raw timestamps have the same
> conversion factor as CLOCK_MONOTONIC_RAW, but differ from that by an
> offset:
>
> MONORAW(AUX$N) = MONORAW(SYSTEM) + OFFSET(AUX$N)
>
> The offset is established when a AUX clock is enabled and stays constant
> for the lifetime of the AUX clock.
>
> Update the comments so they reflect reality.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
> Reported-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
Thanks!
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
(...)