Re: strange AMD x Intel Behaviour in 2.4.26

From: Fabiano Ramos
Date: Thu Oct 07 2004 - 15:31:16 EST


On Thu, 2004-10-07 at 14:45 -0400, Valdis.Kletnieks@xxxxxx wrote:
> On Thu, 07 Oct 2004 15:15:36 -0300, Fabiano Ramos said:
>
> > The code is producing correct results (same as ptrace, I mean)
> > but is RUNNING FASTER on a 500Mhz AMD K6-2 than on a 2.6Ghz HT
> > Pentium 4 !!!! The monitored code runs faster on P4 if not being
> > monitored, as expected.
>
> Most likely, the old slow AMD chipset doesn't take a big performance
> hit for each of the loops into debug-land, and the P4 chipset takes a
> big hit. Not sure if it's a pipeline-drain issue, or relative cost
> of L1/2 cache misses, or what - an architecture expert could probably
> say more. Basically, the AMD goes faster because it has less to forget
> at the end of each counted instruction, while the P4 gains much of its
> speed via a lot of caching/decoding/pipelining tricks, so it has to throw
> away more, and then re-establish state when it comes back.
>

yes, you are probably right. I thought about that, but in no way
I could imagine such a drastic situation. I was wondering if maybe
the kernel did different things for AMD and Pentium, but both
are treated the same, as a i386, RIGHT?????

I have just tried on another AMD core, a 1Ghz Duron, and it outperforms
the AMD K6 (as expected) and the 2.6Ghz P4 as well, probably due to the
same thing.


> Imagine 2 people walking down a hallway - one moves at 1 mile per hour
> when walking, the other at 5. However, every third step each of them drops
> the stack of papers they are carrying - and the slow person drops 5 sheets
> of paper and the fast one drops 200. Who reaches the end of the hall first?
>
> It's probably sort of like that....

:)

Thanks.

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