Re: udelay() possibly broken on Alpha.

Gerard Roudier (groudier@club-internet.fr)
Sat, 28 Aug 1999 22:05:52 +0200 (MET DST)


On Sat, 28 Aug 1999, Richard Henderson wrote:

> On Sat, Aug 28, 1999 at 08:47:45PM +0200, Gerard Roudier wrote:
> > It seems that, on some Alpha machines, udelay() may sometimes execute up
> > to twice slower than expected. Given that the Alpha *delay() stuff is
> > based on inline functions and define's, it could well be that the
> > execution time of small loops depends on the actual address (boundary?) of
> > the loop code as for Pentia.
>
> If it is EV6 machines that are seeing this, change
>
> - __asm__ __volatile__(".align 3\n"
> + __asm__ __volatile__(".align 4\n"

Playing with this sort of alignment is not the way to go in my opinion.
There are lots of subleties in hardware optimizations we probably never
will know about. The difference may be due, for example, to some subtle
hashing that takes into account some other bits.

A strong alignment may allow the Bogo Mips result to be more deterministic
among kernel actual map, but no need to have such a deterministic Bogo
Mips result for udelay() to be accurate. It is the __delay() loop that
must behave consistenly for udelay() to be fine.

> and see if the problem clears up.

I donnot have an Alpha machine. I just based my postings on problems
reported to me. By the way, I am currently expecting some result with
__delay() as a true function, but this will be tried after the week-end.

Gérard.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/