Re: [PATCH 5/5] [DO NOT MERGE] timekeeping: Apply extrapolated ntp_error to clock snapshots

From: Rodolfo Giometti

Date: Mon Oct 05 2026 - 06:17:03 EST


> As a parallel thread I'll also look at unconditionally using the
> existing (non-correcting) ktime_get_snapshot_id() so that we have the
> corresponding counter values, and an ioctl for reporting those to
> userspace alongside the ts_real. I am leaning towards using raw counter
> values even when an offset has been applied to the realtime value, but
> still vacillating a bit.

Raw counter values get my vote: userspace set the offset itself with
PPS_SETPARAMS, so it can apply it to the counter if it needs to, while
the counter should stay the value actually read from the hardware. :-)

AFAIK that's also what the kernel consumer gets today: pps_kc_event() is
passed the timestamp before the offset is added, isn't it?

When you get to the ioctl, please post it as an RFC before the code.

Ciao,

Rodolfo


--
GNU/Linux Solutions e-mail: giometti@xxxxxxxxxxxx
Linux Device Driver giometti@xxxxxxxx
Embedded Systems phone: +39 349 2432127
UNIX programming