From: Csdncannon <csdncannon@gmail.com>
To: Kim Phillips <kim.phillips@freescale.com>
Cc: linuxppc-dev@ozlabs.org, zhouminggang@hotmail.com
Subject: Re: Continual reading from the PowerPc time base register is not stable
Date: Fri, 23 Apr 2010 18:57:55 +0800 [thread overview]
Message-ID: <k2k43c137a81004230357qb67aa161v2ce6290d8d545906@mail.gmail.com> (raw)
In-Reply-To: <20100421194419.3edf2c80.kim.phillips@freescale.com>
[-- Attachment #1: Type: text/plain, Size: 2398 bytes --]
Hi Kim
The isync is not needed, when I only added the long long cast, the
problem can never reproduced.
And I found after Linux started, I ran the "gettime" test code in the
background, if I ran our software application, the gettime could fail
sometimes, and even after killing our software application, the gettime
still failed, if I didn't run our software application after Linux started,
the gettime never fail . I checked out that there is no NTP damone nor cron
tasks running behind, but our software application has the mechanism like
NTP to synchronize time with other boards in our system, the problem is I
cannot figure out why gettime still failed after killing our software
application. Maybe there is a timer running for this proprietary NTP
implementation, even after killing software application?
Thanks
Gino
2010/4/22 Kim Phillips <kim.phillips@freescale.com>
> On Sat, 10 Apr 2010 11:14:09 +0800
> Csdncannon <csdncannon@gmail.com> wrote:
>
> > Sorry, I attached the wrong log, this attachment is the right one.
> >
> > 2010/3/25 Csdncannon <csdncannon@gmail.com>
> >
> > > In my program, the value of the 64-bit time base register is
> read
> > > out, and you will find the later value is even smaller than the earlier
> > > value from the log “log_timebase”. While the kernel depends on the
> accuracy
> > > of the timebase for the compensation of the lost PIT interrupt, the
> negative
> > > value between two continual timebase reading will bring to the jump of
> the
> > > jiffies. And this timebase problem will bring to the instability of the
> > > gettimeofday system call.
> > >
> > > Do you have any idea about this problem, thanks for your any
> > > advice. Attached is the code and log.
>
> Hi, has this been resolved yet?
>
> I took an 8377 rdb board, and let it run timebase.c (with the isync &
> long long casts) all weekend, and have failed to reproduce the issue.
> That was on linux 2.6.33, and I've got another machine running the same
> thing under 2.6.28 for the last couple of hours, still unable to
> reproduce the issue.
>
> Can you please answer the "custom board or FSL reference board"
> question, try duplicating with a newer kernel version, discuss other
> time sources that may be running on your system (RTC_DRV, ntp service),
> post a .config, ...
>
> Kim
>
[-- Attachment #2: Type: text/html, Size: 2991 bytes --]
prev parent reply other threads:[~2010-04-23 10:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 2:41 Continual reading from the PowerPc time base register is not stable Csdncannon
2010-03-25 8:21 ` Benjamin Herrenschmidt
2010-03-25 10:05 ` Arnd Bergmann
2010-03-25 15:00 ` Csdncannon
2010-03-25 20:38 ` Benjamin Herrenschmidt
2010-03-26 1:11 ` Csdncannon
2010-03-26 1:22 ` Segher Boessenkool
2010-03-26 2:01 ` Csdncannon
2010-03-26 8:52 ` Segher Boessenkool
2010-03-26 9:01 ` Segher Boessenkool
2010-03-26 12:14 ` Csdncannon
2010-04-06 8:02 ` Csdncannon
2010-03-26 1:55 ` Benjamin Herrenschmidt
2010-03-26 2:04 ` Csdncannon
2010-03-25 22:00 ` Chris Friesen
2010-03-25 22:57 ` Benjamin Herrenschmidt
2010-03-25 23:37 ` Kumar Gala
2010-03-25 21:37 ` Segher Boessenkool
2010-04-10 3:14 ` Csdncannon
2010-04-22 0:44 ` Kim Phillips
2010-04-22 0:50 ` Benjamin Herrenschmidt
2010-04-22 23:27 ` Kim Phillips
2010-04-23 10:57 ` Csdncannon [this message]
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=k2k43c137a81004230357qb67aa161v2ce6290d8d545906@mail.gmail.com \
--to=csdncannon@gmail.com \
--cc=kim.phillips@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=zhouminggang@hotmail.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;
as well as URLs for NNTP newsgroup(s).