From: Benjamin Gamsa <ben@somanetworks.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: time jumps forward/backwards
Date: Mon, 31 Aug 2009 20:01:10 -0400 [thread overview]
Message-ID: <4A9C6446.2000202@somanetworks.com> (raw)
In-Reply-To: <19100.24755.889091.412993@cargo.ozlabs.ibm.com>
Paul Mackerras wrote:
> Ben Gamsa writes:
>
>> It appears to be the case that when the time on the system is around the
>> epoch (1970), that time will occasionally jump forward and then backward
>> by about 17592 seconds. When it jumps forward, it always jumps back a
>> few milliseconds later. However, it's not always easy to catch these
>> occurrences. The delta is more specifically about 17592186059 usec,
>> give or take a few 10s of microseconds (most of the time), despite the
>> fact that the user-level program I have that is testing it only checks
>> every 10 milliseconds.
>
> I don't think the time code in the kernel is designed to handle
> negative values, i.e., times before the epoch. If you want it to do
> that you'll have to check places like arch/powerpc/kernel/time.c,
> kernel/time/timekeeping.c, arch/powerpc/include/asm/time.h, etc., and
> make sure that it uses signed types where necessary and that the
> arithmetic is correct.
>
The time never goes negative. It starts off at the epoch and moves
forward, but sometimes it jumps forward by 17952 seconds, and then
immediately jumps back. But it never goes negative (or prior to 1970).
ben
next prev parent reply other threads:[~2009-09-01 0:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-31 21:53 time jumps forward/backwards Ben Gamsa
2009-08-31 23:45 ` Paul Mackerras
2009-09-01 0:01 ` Benjamin Gamsa [this message]
2009-09-01 0:09 ` Benjamin Gamsa
2009-09-01 2:20 ` Benjamin Gamsa
2009-09-01 2:31 ` Sean MacLennan
2009-09-01 3:57 ` Benjamin Gamsa
2009-09-01 10:49 ` Benjamin Herrenschmidt
2009-09-01 11:20 ` Benjamin Gamsa
2009-09-03 12:49 ` Ben Gamsa
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=4A9C6446.2000202@somanetworks.com \
--to=ben@somanetworks.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.