[linux-fbdev] Re: readl() and friends and eieio on PPC
Richard Henderson
rth at cygnus.com
Thu Aug 12 15:43:44 EST 1999
On Thu, Aug 12, 1999 at 03:00:46PM +1000, Paul Mackerras wrote:
> Show us the numbers?
Attached is a quick userland study wrt main memory. How much
more accurate to a real device do I need to get to convice you
that the test is valid enough?
As I see it, testing against main memory should be the lower
bound of the numbers, since it's the quickest to respond. A
real device will take longer to respond, so any enforced delays
(or failures to write-combine) will only exagerate the difference.
Anyway, the results (in cycles) from my 533MHz sx164 are:
10
10
10
10
10
223
94
94
94
94
So the cost of wmb for 8 store+wmb, versus 8 stores with one wmb,
is over 9:1.
> I don't believe the frame-buffer guys will actually
> see any measurable improvement in performance from taking out the
> eieio from readl/writel on PPC.
For grins, will you try the same test on your ppc?
r~
-------------- next part --------------
#include <stdio.h>
main()
{
int i;
unsigned s, e;
unsigned long mem;
for (i = 0; i < 5; ++i)
{
asm("rpcc %0
stq $31,%2
stq $31,%2
stq $31,%2
stq $31,%2
stq $31,%2
stq $31,%2
stq $31,%2
wmb
stq $31,%2
rpcc %1"
: "=r"(s), "=r"(e), "=m"(mem));
printf("%u\n", e-s);
}
for (i = 0; i < 5; ++i)
{
asm("rpcc %0
stq $31,%2
wmb
stq $31,%2
wmb
stq $31,%2
wmb
stq $31,%2
wmb
stq $31,%2
wmb
stq $31,%2
wmb
stq $31,%2
wmb
stq $31,%2
wmb
rpcc %1"
: "=r"(s), "=r"(e), "=m"(mem));
printf("%u\n", e-s);
}
}
More information about the Linuxppc-dev
mailing list