Gilles Chanteperdrix wrote:
Jan Kiszka wrote:
> > I still don't get why you would bother providing two different time
> > specs? Is this really needed?
>
> I think it's time to repeat the measuring, e.g. rt_timer_read() vs.
> rt_timer_read_tsc(). It will certainly not make a big difference on GHz
> machines, but on anything around Pentium I, we once measured a
> significant overhead. Will try to organise some more concrete numbers
> tomorrow.
What costs are the calls to llimd and imuldiv, right ? According to
some measurements I made, ullimd is around 100 cycles and imuldiv around
30 cycles on a PII and PIII class machine without cache effects. By
pre-computing the conversion factors (this can always be done, since
they do not change often), you can even go down to less than 30 cycles
for ullimd and less than 5 cycles for imuldiv (1 cycle on pentium
M), I never commited this, since I lost one bit of accuracy, and never
understood where... But even 100 cycles is ridiculous when compared to
cache effects and hardware latencies. And llimd should never be called
on the critical path, that is at the wake-up time, only imuldiv is
called to compute the next timer shot.
100 cycles here 100 there ... haw many at the end?
Paolo.