Re: [patch V2 17/26] timekeeping: Provide time getters for auxiliary clocks

From: Thomas Gleixner
Date: Sat Jun 14 2025 - 03:21:55 EST


On Fri, Jun 13 2025 at 19:51, John Stultz wrote:
> On Mon, May 19, 2025 at 1:33 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>> +/**
>> + * ktime_get_aux - Get TAI time for a AUX clock
>
> Is this actually the TAI time? Wouldn't it be the MONOTONIC time for
> the AUX clock?

Of course not TAI. It's not monotonic either as it can be set. It's just
AUX clock time, whatever that means :)

>> + * @id: ID of the clock to read (CLOCK_AUX...)
>> + * @kt: Pointer to ktime_t to store the time stamp
>> + *
>> + * Returns: True if the timestamp is valid, false otherwise
>> + */
>> +bool ktime_get_aux(clockid_t id, ktime_t *kt)
>> +{
>> + struct tk_data *tkd = aux_get_tk_data(id);
>> + struct timekeeper *tk;
>
> Nit: Just to be super explicit, would it be good to name these aux_tk
> and aux_tkd?
> So it's more clear you're not working with the standard timekeeper?

Yes.