linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Joel Daniels <jdaniels@sent.com>, Stephen Boyd <sboyd@kernel.org>,
	linux-kernel@vger.kernel.org,
	Alessandro Zummo <a.zummo@towertech.it>,
	linux-rtc@vger.kernel.org, x86@kernel.org
Subject: Re: Time keeping while suspended in the presence of persistent clock drift
Date: Wed, 15 Dec 2021 15:10:37 -0800	[thread overview]
Message-ID: <CALAqxLUz8c-mOMVUsHj39Vbh35wHA1a8QfbTjLFrnL8qi2Ju6Q@mail.gmail.com> (raw)
In-Reply-To: <87pmpxlcrd.ffs@tglx>

On Wed, Dec 15, 2021 at 2:33 PM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> On Wed, Dec 15 2021 at 14:02, John Stultz wrote:
> > On Wed, Dec 15, 2021 at 1:32 PM Alexandre Belloni
> >> I'd rather lean towards the timekeeping code doing that. The RTC
> >
> > Heh, touche'!  :)
> >
> >> subsystem doesn't know which RTC has to be used.
> >
> > Though the RTC layer *is* the one that tracks which RTC is used, via
> > the logic in drivers/rtc/class.c, and the timekeeping core already has
> > adjtimex for timekeeping corrections, so if we're correcting
> > underlying RTCs it seems such tuning would best be done in the RTC
> > layer.
> >
> > Though how the persistent_clock interface ties into such corrections
> > would be a separate thing.
>
> Might be the final trigger to get rid of that leftover from the last
> millenium?
>

Yeah. Simplifying probably helps for consistency and maintainability.
(on top of the rtc and persistent clock, we also have the nonstop
clocksources that keep running through suspend and can be used. :)

It's just that window after resume but before the sleep time injection
where time would be incorrect always made me uncomfortable, so it was
nice to have some correct way to avoid that, even if all hardware
couldn't utilize it.  But as I'm less involved here, maybe someone
else can simplify things and live with that worry. :)

thanks
-john

  reply	other threads:[~2021-12-15 23:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5af5d2a5-767c-d313-3be6-cb6f426f1980@sent.com>
     [not found] ` <b074f506-2568-4506-9557-4a9bc9cbea83@www.fastmail.com>
     [not found]   ` <87wnkbuuuz.ffs@tglx>
     [not found]     ` <4bb238e1-e8fa-44e6-9f5e-d047d1d4a892@www.fastmail.com>
2021-12-14 13:57       ` Time keeping while suspended in the presence of persistent clock drift Thomas Gleixner
2021-12-14 17:43         ` Joel Daniels
2021-12-15 21:06           ` John Stultz
2021-12-15 21:32             ` Alexandre Belloni
2021-12-15 22:02               ` John Stultz
2021-12-15 22:33                 ` Thomas Gleixner
2021-12-15 23:10                   ` John Stultz [this message]
2021-12-15 22:42             ` Joel Daniels
2021-12-15 23:26               ` John Stultz
2021-12-15 23:36                 ` Alexandre Belloni
2021-12-16  0:09                   ` Joel Daniels
2021-12-15 23:28               ` Alexandre Belloni
2021-12-15 21:42         ` Alexandre Belloni
2021-12-15 22:05           ` Joel Daniels

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALAqxLUz8c-mOMVUsHj39Vbh35wHA1a8QfbTjLFrnL8qi2Ju6Q@mail.gmail.com \
    --to=john.stultz@linaro.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=jdaniels@sent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).