From: Tom Rini <trini@kernel.crashing.org>
To: Joakim Tjernlund <joakim.tjernlund@lumentis.se>
Cc: LinuxPPC <linuxppc-embedded@lists.linuxppc.org>
Subject: Re: ppc_8xx-gcc 2.95.3 Monta Vista does not do ANY loop unrolling
Date: Tue, 12 Nov 2002 08:22:56 -0700 [thread overview]
Message-ID: <20021112152255.GF658@opus.bloom.county> (raw)
In-Reply-To: <IGEFJKJNHJDCBKALBJLLGEOFFHAA.joakim.tjernlund@lumentis.se>
On Tue, Nov 12, 2002 at 10:40:41AM +0100, Joakim Tjernlund wrote:
> I optimized the crc32() in JFFS2(fs/jffs2/crc.h) by manually unrolling
> the crc32 loop. This gave me a speed increase of 22% in mounting JFFS2 FS
>
> Later Alan Cox pointed out that my changes makes x86 run slower and it turns
> out that on x86 and a fairly new gcc will automatically unroll loops 'where appropriate'
>
> Removed my hand coded unrolling and added -funroll-loops to the JFFS2 Makefile,
> I got similar results as my hand coded unrolling (a little better).
>
> I therefore conclude that ppc_8xx-gcc 2.95.3 from Monta Vista does not do ANY unrolling
> unless you specify -funroll-loops. Doing this for the whole kernel is NOT a good idea,
> it will run slower due to big increase of size.
I'm sort-of supprised that gcc-2.95.x (or gcc-*, for that matter) will
unroll some loops with only -O2 since the info page on gcc-3.2 and
gcc-2.95 both say that -funroll-loops isn't turned on my any of the -O
levels.
So I suspect someone decided that small loops can safely be unrolled on
i386 at some optimization level, but that same decision (with possibly
good reason) was not made for PPC32. So it's a gcc feature, not a
MVista-specific issue.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
[ disclaimer: I work for MVista. ]
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2002-11-12 15:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-12 8:12 ELDK 2.0, glibc and kernel 2.4.20??? Steven Scholz
2002-11-12 9:40 ` ppc_8xx-gcc 2.95.3 Monta Vista does not do ANY loop unrolling Joakim Tjernlund
2002-11-12 15:22 ` Tom Rini [this message]
2002-11-12 16:09 ` Joakim Tjernlund
2002-11-12 16:25 ` Tom Rini
2002-11-12 16:46 ` Joakim Tjernlund
2002-11-12 18:40 ` Tom Rini
2002-11-12 21:30 ` Joakim Tjernlund
2002-11-12 19:56 ` Mark Hatle
2002-11-12 21:33 ` Joakim Tjernlund
2002-11-12 12:39 ` ELDK 2.0, glibc and kernel 2.4.20??? wolfgang.grandegger
2002-11-12 12:58 ` Steven Scholz
-- strict thread matches above, loose matches on Subject: below --
2002-11-12 9:56 ppc_8xx-gcc 2.95.3 Monta Vista does not do ANY loop unrolling Jaap-Jan Boor
2002-11-12 10:42 ` Joakim Tjernlund
2002-11-12 10:49 Jaap-Jan Boor
2002-11-12 10:55 ` Joakim Tjernlund
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=20021112152255.GF658@opus.bloom.county \
--to=trini@kernel.crashing.org \
--cc=joakim.tjernlund@lumentis.se \
--cc=linuxppc-embedded@lists.linuxppc.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 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.