Re: [PATCH v2] timekeeping: move multigrain timestamp floor handling into timekeeper

From: John Stultz
Date: Thu Sep 12 2024 - 16:16:11 EST


On Thu, Sep 12, 2024 at 1:11 PM John Stultz <jstultz@xxxxxxxxxx> wrote:
> So initially I was expecting this to look something like (sorry for
> the whitespace damage here):
> {
> do {
> seq = read_seqcount_begin(&tk_core.seq);
> ts->tv_sec = tk->xtime_sec;
> mono = tk->tkr_mono.base;
> nsecs = timekeeping_get_ns(&tk->tkr_mono);
> offset = *offsets[TK_OFFS_REAL];
> } while (read_seqcount_retry(&tk_core.seq, seq));
>
> mono = ktime_add_ns(mono, nsecs);
> do {
> old = atomic64_read(&mg_floor);
> if (floor >= mono)
> break;

Apologies, that should be
if (old >= mono)
break;

thanks
-john