Re: [PATCH] 2.6.17-rt add clockevent to ixp4xx

From: Milan Svoboda
Date: Fri Jul 14 2006 - 06:26:52 EST


> On Thu, 2006-07-13 at 07:41 -0700, Daniel Walker wrote:
> > On Thu, 2006-07-13 at 10:53 +0000, Milan Svoboda wrote:
> > > Hello,
> > >
> > > there are patches that enable clock event on ixp4xx platform. This
should
> > > enable high resolution timers... Option for hrtimers in menuconfig
is
> > > also enabled.
> > >
> > > I tested it on nanosleep test program (included in attachments) and
obtained
> > > this results:
> > >
> > > requested: 899000 us, got: 899159 us, diff: -159 us
> > > requested: 897000 us, got: 897209 us, diff: -209 us
> > > requested: 895000 us, got: 899803 us, diff: -4803 us
> > > requested: 893000 us, got: 899425 us, diff: -6425 us
> > > requested: 891000 us, got: 899806 us, diff: -8806 us
> > > requested: 889000 us, got: 890142 us, diff: -1142 us
> > > requested: 887000 us, got: 889873 us, diff: -2873 us
> > > requested: 885000 us, got: 888096 us, diff: -3096 us
> >
> > I'd turn off some of the debugging options, and retest. For instance,
> > the pi-list debugging option will cause arbitrary latency, which you
> > seem to show in your results. Normally with PREEMPT_RT turned on you
> > would expect the timers to trigger within a constant amount of time
from
> > when they are suppose to.
>
> No, the time differences looks like the high res mode never gets
> switched on. its oszillating between 0 and 10ms, which is the usual
> behaviour for a non hrt kernel.
>
> Also I would recommend to test without preempt-rt in the first place.
> Preempt-rt on ARM is not really well tested, so you dont fight two
> battles at once.

Ok ;-), I did what you told me and there is patch agains
2.6.17-hrt-dyntick5
which enables clocksource and clockevent for ixp4xx. There were
some changes in common code to be able to compile it for arm, I'm
not sure If these changes are correct, can you please check this out?

I tested it with my nanosleep test program and got beautiful
results - differency between requested and real time of sleep
is stable around 30us.

Important thing is to use IXP4XX_OST_ONE_SHOT! Without this set, results
are as bad as I reported previously...

I'm trying to fix -rt to use this, but interface has been changed and I
don't know hot to switch hrtimers to use one-shots. It looks like it wants
to always use cyclic timers...

The bad thing is that I tested it also using timer_create with
CLOCK_REALTIME
and the best what I got was 100 tick per sec... I'll try to find where is
problem.

Signed-off-by: Milan Svoboda <msvoboda@xxxxxxxxxxxxxxx>
---

Attachment: hrt_ixp4xx.patch
Description: Binary data