public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Jaap-Jan Boor <jjboor@lucent•com>
To: linuxppc-embedded@lists•linuxppc.org, joakim.tjernlund@lumentis•se
Subject: RE: ppc_8xx-gcc 2.95.3 Monta Vista does not do ANY loop unrolling
Date: Tue, 12 Nov 2002 11:49:25 +0100 (MET)	[thread overview]
Message-ID: <200211121049.gACAnPg15672@hzsc257.nl.lucent.com> (raw)


>
> Jaap-Jan,
>
> Yes, it's not a good ide to enable -funroll-loops for the whole
> kernel, but some functions should be unrolled anyway, like the crc32()
> function since it won't increase the size very much but will yield
> a significant speed increase.
>
> So maybe the right way is to identify some loops and enable unrolling on them.

yes (e.g. in fs/jffs2/Makefile)

>
> Where in the PPC FAQ did you read that -Os for 8xx processors?

http://penguinppc.org/embedded/howto/x1273.html#AEN1346

>
>  Joakim
>
> > Joakim,
> >
> > Enable loop unrolling by default for 8xx processors is not
> > a good idea because of the limited instructions cache size.
> >
> > I think that's also what is recommended in the ppc faq: enable
> > size optimization (-Os) for 8xx processors gives better performance.
> >
> > For a 750 or so, it would be good to enable loop unrolling.
> >
> > Jaap-Jan
> >
> >
> > >
> > > Hi
> > >
> > > 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.
> > >
> > > Now I wonder:
> > > Is this a gcc 2.95.3, PPC or Monta Vista limitation?
> > >
> > > Which compiler will do unrolling 'where appropriate' for 8xx PPC and
> > > Where can I get a precompiled version?
> > >
> > > The short term solution is to specify -funroll-loops for individual files/directories.
> > > Obviously JFFS2 should be included, but what else?
> > >
> > >
> > >
> > >
> >
>
>
>
>

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

             reply	other threads:[~2002-11-12 10:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-12 10:49 Jaap-Jan Boor [this message]
2002-11-12 10:55 ` ppc_8xx-gcc 2.95.3 Monta Vista does not do ANY loop unrolling Joakim Tjernlund
  -- strict thread matches above, loose matches on Subject: below --
2002-11-12  9:56 Jaap-Jan Boor
2002-11-12 10:42 ` Joakim Tjernlund
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
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

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=200211121049.gACAnPg15672@hzsc257.nl.lucent.com \
    --to=jjboor@lucent$(echo .)com \
    --cc=joakim.tjernlund@lumentis$(echo .)se \
    --cc=linuxppc-embedded@lists$(echo .)linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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