linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Roger Larsson <roger.larsson@norran.net>
To: linuxppc-embedded@ozlabs.org
Subject: Re: Kernel 2.6 on MPC8xx performance trouble...
Date: Fri, 28 Oct 2005 11:36:21 +0200	[thread overview]
Message-ID: <200510281136.21575.roger.larsson@norran.net> (raw)
In-Reply-To: <200510280857.44625.david.jander@protonic.nl>

On Friday 28 October 2005 08.57, David Jander wrote:
> Hi all,
>
> Many people have said it before: 2.6 has a performance penalty specially
> for embdedded systems.
> But now that I have 2.6 running on our 100MHz MPC852T based board, I was
> shocked to see the result:
> The most simple task doing nothing but a closed loop of integer math runs
> at _half_ the speed compared to kernel 2.4.25!!!!!
>
> Here are the conditions for the test:
> - Bogomips are the same, so the CPU definitely runs at the same clock-rate
> (and not half) as with "2.4".
> - Enabling and disabling preemption doesn't have any impact (as expected
> for such kinds of tasks).
> - Setting HZ to 100 or 1000 also has only about 3% impact on speed.
> - The binary of the test program is the same in both cases (no re-compile
> with other optimizations by accident).
> - The hardware is the same (exact same board).
> - Certain hardware drivers that are not ported to "2.6" yet were present in
> "2.4" but (obviously) not in "2.6", but non of them could have a _positive_
> impact on performance.
> - Kernel versions are 2.4.25 (denx-devel) and 2.6.14-rc5 (denx-git
> 20051027).
>
> Result: The test takes 3 seconds on kernel-2.6 and 1.5 seconds on
> kernel-2.4. Here is what "time" has to say about it:
>
> real    0m3.119s
> user    0m3.080s
> sys     0m0.040s
>
> The test loop is pretty brain-dead, but that doesn't matter right now.
> This is it:
> 	[....]
> 	gettimeofday(&tv0,NULL);
>         for(t=0L; t<10000000L; t++)
>         {
>                 a+=b; /* Do something */
>         }
>         gettimeofday(&tv,NULL);
> 	[...]
>
> Any ideas?
> Am I misconfiguring something? Is 2.6 support for mpc8xx still broken
> (cache/tlb, mm, etc) or is 2.6 supposed to perform THAT bad??

Have you verified the system measured time with wall clock (wrist watch)?
System time could be wrong on one of the systems.

What is 'a' and 'b'? The only other explanation I can see is that your
"Do something" is more memory heavy than you think - array calculations?
(Cache problems should probably give a worse result, but you could check that
those config registers are the same).

/RogerL

  reply	other threads:[~2005-10-28  9:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-28  6:57 Kernel 2.6 on MPC8xx performance trouble David Jander
2005-10-28  9:36 ` Roger Larsson [this message]
2005-10-28 10:57   ` David Jander
2005-10-28 18:44     ` Roger Larsson
2005-10-28 20:37     ` Wolfgang Denk
2005-10-31  9:31       ` David Jander
2005-10-28 15:30 ` Marcelo Tosatti
2005-10-31  8:21   ` David Jander
2005-10-31 12:58     ` Mark Chambers
2005-10-31 13:08       ` David Jander
2005-10-31 15:29         ` David Jander

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=200510281136.21575.roger.larsson@norran.net \
    --to=roger.larsson@norran.net \
    --cc=linuxppc-embedded@ozlabs.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).