linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: "Jörn Engel" <joern@logfs.org>
Cc: Chris Simmonds <chris@2net.co.uk>, Arnd Bergmann <arnd@arndb.de>,
	Marco <marco.stornelli@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	Linux Embedded <linux-embedded@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 06/14] Pramfs: Include files
Date: Tue, 23 Jun 2009 09:31:20 +0100	[thread overview]
Message-ID: <1245745880.25547.1637.camel@macbook.infradead.org> (raw)
In-Reply-To: <20090623055735.GA23119@logfs.org>

On Tue, 2009-06-23 at 07:57 +0200, Jörn Engel wrote:
> 
> Feel free to improve the test.  It is admittedly crap and designed to
> support Chris' argument.  But seeing that it still fails to do so and
> Arnd has already shown one improvement that weakened Chris' argument,
> I
> guess we can all agree that further improvments won't change the
> conclusion, can we? ;)

True. At this point, I'm actually more interested in just how crap the
kernel code is, that's generated by your test. We don't have a portable
way to store a wrong-endian number. Using st_le32() on PowerPC we can
get it down to something like this...

le32:   27777875 cycles
be32:   26564494 cycles
loops: 100000000
le32:   21739926 cycles
be32:   20289854 cycles
loops: 100000000
le32:   25206069 cycles
be32:   20289854 cycles
loops: 100000000
le32:   21739435 cycles
be32:   17391303 cycles
loops: 100000000
le32:   22197744 cycles
be32:   17391305 cycles
loops: 100000000
le32:   22195411 cycles
be32:   21946167 cycles
loops: 100000000

  a0:   7f 4c 42 e6     mftbl   r26
  a4:   2c 1a 00 00     cmpwi   r26,0
  a8:   41 a2 ff f8     beq-    a0 <.init_module+0x54>
  ac:   3c 00 05 f5     lis     r0,1525
  b0:   3b 7f 00 70     addi    r27,r31,112
  b4:   60 00 e1 00     ori     r0,r0,57600
  b8:   7d 20 dc 2c     lwbrx   r9,0,r27
  bc:   39 29 00 01     addi    r9,r9,1
  c0:   79 29 00 20     clrldi  r9,r9,32
  c4:   7d 20 dd 2c     stwbrx  r9,0,r27
  c8:   34 00 ff ff     addic.  r0,r0,-1
  cc:   40 82 ff ec     bne+    b8 <.init_module+0x6c>
  d0:   7f ac 42 e6     mftbl   r29
  d4:   2c 1d 00 00     cmpwi   r29,0
  d8:   41 a2 ff f8     beq-    d0 <.init_module+0x84>
  dc:   3c 00 05 f5     lis     r0,1525
  e0:   60 00 e1 00     ori     r0,r0,57600
  e4:   81 3f 00 74     lwz     r9,116(r31)
  e8:   39 29 00 01     addi    r9,r9,1
  ec:   91 3f 00 74     stw     r9,116(r31)
  f0:   34 00 ff ff     addic.  r0,r0,-1
  f4:   40 82 ff f0     bne+    e4 <.init_module+0x98>
  f8:   7f 8c 42 e6     mftbl   r28

Interestingly, if we get rid of the (gratuitous, afaict) clrldi at 0xc0,
the little-endian version goes _faster_:

le32:   18839472 cycles
be32:   21946166 cycles
loops: 100000000
le32:   25923621 cycles
be32:   29629625 cycles
loops: 100000000

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-06-23  8:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-13 13:21 [PATCH 06/14] Pramfs: Include files Marco
2009-06-13 14:04 ` Sam Ravnborg
2009-06-13 22:59   ` Arnd Bergmann
2009-06-14  7:15     ` Marco
2009-06-21 17:07     ` Marco
2009-06-21 20:22       ` Arnd Bergmann
2009-06-22  6:23         ` Marco Stornelli
2009-06-22 11:17           ` Arnd Bergmann
2009-06-22 18:05             ` Marco
2009-06-22 18:33               ` Arnd Bergmann
2009-06-22 19:31                 ` Chris Simmonds
2009-06-22 20:30                   ` Sam Ravnborg
2009-06-22 22:00                     ` Tim Bird
2009-06-23  4:21                       ` Sam Ravnborg
2009-06-23 17:38                         ` Marco
2009-06-23 19:26                           ` Jörn Engel
2009-06-23 21:15                             ` David Woodhouse
2009-06-23 21:55                               ` Arnd Bergmann
2009-06-24  6:32                                 ` Marco Stornelli
2009-06-24 15:30                                   ` Arnd Bergmann
2009-06-24 16:49                                     ` Marco
2009-06-22 21:41                   ` Jörn Engel
2009-06-22 22:20                     ` David Woodhouse
2009-06-23  5:57                       ` Jörn Engel
2009-06-23  8:31                         ` David Woodhouse [this message]
2009-06-22 23:07                     ` Arnd Bergmann
2009-06-23  6:40                 ` Marco Stornelli
2009-06-14  7:15   ` Marco

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=1245745880.25547.1637.camel@macbook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=arnd@arndb.de \
    --cc=chris@2net.co.uk \
    --cc=joern@logfs.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.stornelli@gmail.com \
    --cc=sam@ravnborg.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).