All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: Fabiano Ramos <ramos_fabiano@yahoo.com.br>
Cc: linux-kernel@vger.kernel.org
Subject: Re: strange AMD x Intel Behaviour in 2.4.26
Date: Thu, 07 Oct 2004 23:40:57 +0200	[thread overview]
Message-ID: <m31xga2oly.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <2MLlk-5MH-5@gated-at.bofh.it> (Fabiano Ramos's message of "Thu, 07 Oct 2004 20:40:06 +0200")

Fabiano Ramos <ramos_fabiano@yahoo.com.br> writes:

>   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

The Pentium 4 is slow for anything that involves changing of the 
ring or an exception. Well known problem, you can see it in other
benchmarks too. Normally the penalty is not that drastic, probably
it doesn't like single stepping very much.

However a cheaper way to do this would be to use performance counters
and save/restore them on each context switch. There is normally a
perfctr for "retired instructions on ring 3", which is what you
want. Mikael P's perfctr patchkit can do that per process.

-Andi


       reply	other threads:[~2004-10-07 21:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2MLlk-5MH-5@gated-at.bofh.it>
2004-10-07 21:40 ` Andi Kleen [this message]
2004-10-07 22:25   ` strange AMD x Intel Behaviour in 2.4.26 Fabiano Ramos
2004-10-07 18:15 Fabiano Ramos
2004-10-07 18:45 ` Valdis.Kletnieks
2004-10-07 20:19   ` Fabiano Ramos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m31xga2oly.fsf@averell.firstfloor.org \
    --to=ak@muc.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ramos_fabiano@yahoo.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.