All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Gamsa <ben@somanetworks.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: time jumps forward/backwards
Date: Mon, 31 Aug 2009 17:53:33 -0400	[thread overview]
Message-ID: <4A9C465D.4010801@somanetworks.com> (raw)

Our project is currently using 2.6.27.4 with a patch from Paul Mackerras 
("powerpc: Improve resolution of VDSO clock_gettime") running on a 
MPC8555.  We picked up the patch on the hope that it would fix an 
earlier problem we had with time jumping forwards and backwards shortly 
after boot-up.  It seemed to fix that problem, but it seems we have 
another, similar problem.

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.

The number seems suspiciously close to 2^44 nanoseconds, which suggests 
some sort of overflow error, perhaps caused by the time being set to 
around time 0.

I'm not really sure where to begin looking (I know that the time code is 
one of the more sensitive bits in the system so I definitely don't want 
to go blindly mucking around), so I was hoping to get some suggestions 
from the list.

Thanks for any help.

-- 
Ben Gamsa       ben@somanetworks.com
SOMA Networks   312 Adelaide St. W. Suite 600 Toronto, Ontario, M5V1R2

             reply	other threads:[~2009-08-31 22:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-31 21:53 Ben Gamsa [this message]
2009-08-31 23:45 ` time jumps forward/backwards Paul Mackerras
2009-09-01  0:01   ` Benjamin Gamsa
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=4A9C465D.4010801@somanetworks.com \
    --to=ben@somanetworks.com \
    --cc=linuxppc-dev@lists.ozlabs.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.