From: john stultz <johnstul@us.ibm.com>
To: Tim Bird <tim.bird@am.sony.com>
Cc: Nigel Cunningham <ncunningham@linuxmail.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] new timeofday core subsystem (v. A2)
Date: Tue, 01 Feb 2005 18:00:16 -0800 [thread overview]
Message-ID: <1107309617.2040.227.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <4200316C.2080709@am.sony.com>
On Tue, 2005-02-01 at 17:48 -0800, Tim Bird wrote:
> john stultz wrote:
> > Interesting patch. Indeed, the trade off is just how quickly you want to
> > boot vs how much drift you gain each suspend/resume cycle. Assuming all
> > of the clocks are good, your patch could introduce up to 2 seconds of
> > drift each suspend/resume cycle.
>
> If we're not writing to the RTC on suspend, then I believe the drift is
> capped. For some consumer products, 2 seconds of drift is OK.
>
> Nigel, does the RTC get written to, or just read, on suspend?
I'll let Nigel respond, but I don't believe so. The time code only
writes out to the CMOS every X-minutes if we're synced w/ the NTP
server.
> Also, I'm worried about the clock appearing to run backwards over a suspend.
> Unless a suspend/resume cycle took less than 1 second, I don't think this could
> happen. Is that right?
Well (with my code, the existing code might be slightly different), on
suspend we read the persistent clock and we accumulate all the time that
has passed on the timesource. Then on resume we read the persistent
clock, the delta between persistent clock reads (which cannot be
negative unless the CMOS runs backwards) is added to the system time and
a new time interval is started from the current value of the
timesource.
So, unless something tweaks the CMOS between reads, or the hardware has
problems, then time should not go backwards.
thanks
-john
next prev parent reply other threads:[~2005-02-02 2:00 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-24 22:51 john stultz
2005-01-24 22:52 ` [RFC][PATCH] new timeofday arch specific hooks " john stultz
2005-01-24 22:53 ` [RFC][PATCH] new timeofday arch specific timesources " john stultz
2005-01-24 23:29 ` Christoph Lameter
2005-01-25 0:04 ` john stultz
2005-01-25 2:28 ` [RFC][PATCH] new timeofday arch specific hooks " Benjamin Herrenschmidt
2005-01-25 23:09 ` john stultz
2005-01-25 23:53 ` Benjamin Herrenschmidt
2005-01-26 0:17 ` john stultz
2005-01-26 0:34 ` Christoph Lameter
2005-01-26 3:29 ` Benjamin Herrenschmidt
2005-01-26 16:51 ` Christoph Lameter
2005-01-26 3:14 ` Benjamin Herrenschmidt
2005-01-24 23:24 ` [RFC][PATCH] new timeofday core subsystem " Christoph Lameter
2005-01-25 0:03 ` john stultz
2005-01-25 0:08 ` Christoph Lameter
2005-01-25 0:33 ` john stultz
2005-01-25 1:54 ` Christoph Lameter
2005-01-25 7:50 ` Ulrich Windl
2005-01-25 12:25 ` Tim Schmielau
2005-01-25 7:41 ` Ulrich Windl
2005-01-25 8:17 ` Andi Kleen
2005-01-25 23:18 ` john stultz
2005-02-01 22:06 ` Tim Bird
2005-02-01 22:48 ` john stultz
2005-02-01 23:14 ` Nigel Cunningham
2005-02-01 23:32 ` john stultz
2005-02-02 0:04 ` Nigel Cunningham
2005-02-02 0:27 ` john stultz
2005-02-02 0:36 ` Nigel Cunningham
2005-02-01 23:53 ` Tim Bird
2005-02-02 0:19 ` john stultz
2005-02-02 1:48 ` Tim Bird
2005-02-02 2:00 ` john stultz [this message]
2005-02-02 2:23 ` Nigel Cunningham
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=1107309617.2040.227.camel@cog.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncunningham@linuxmail.org \
--cc=tim.bird@am.sony.com \
/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
all inboxes | Powered by JetHome®