Re: strange AMD x Intel Behaviour in 2.4.26

From: Valdis . Kletnieks
Date: Thu Oct 07 2004 - 13:57:53 EST


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.

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....

Attachment: pgp00000.pgp
Description: PGP signature