Continual reading from the PowerPc time base register is not stable

Kim Phillips kim.phillips at freescale.com
Fri Apr 23 09:27:14 EST 2010


On Thu, 22 Apr 2010 10:50:16 +1000
Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:

> On Wed, 2010-04-21 at 19:44 -0500, Kim Phillips wrote:
> > 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.
> 
> Do we need to add an isync to the vdso and kernel gettimeofday() ?

don't see why: I put two gettimeofday calls in a tight loop, checking
if (t2.tv_sec < t1.tv_sec) || (t2.tv_sec > t1.tv_sec + 1), and the
condition was never met.  I also removed all {i,}sync instructions from
timebase.c (but left the long long casts in), and no failures were
reported.

Kim


More information about the Linuxppc-dev mailing list