Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757666AbZFWIbv (ORCPT ); Tue, 23 Jun 2009 04:31:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751698AbZFWIbe (ORCPT ); Tue, 23 Jun 2009 04:31:34 -0400 Received: from casper.infradead.org ([85.118.1.10]:49862 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750986AbZFWIbc (ORCPT ); Tue, 23 Jun 2009 04:31:32 -0400 Subject: Re: [PATCH 06/14] Pramfs: Include files From: David Woodhouse To: =?ISO-8859-1?Q?J=F6rn?= Engel Cc: Chris Simmonds , Arnd Bergmann , Marco , Sam Ravnborg , Linux FS Devel , Linux Embedded , Linux Kernel In-Reply-To: <20090623055735.GA23119@logfs.org> References: <4A33A7EC.6070008@gmail.com> <200906221317.04166.arnd@arndb.de> <4A3FC7F1.5050108@gmail.com> <200906222033.20883.arnd@arndb.de> <4A3FDBFE.8050509@2net.co.uk> <20090622214155.GA19332@logfs.org> <1245709239.25547.394.camel@macbook.infradead.org> <20090623055735.GA23119@logfs.org> Content-Type: text/plain; charset="UTF-8" Date: Tue, 23 Jun 2009 09:31:20 +0100 Message-Id: <1245745880.25547.1637.camel@macbook.infradead.org> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 (2.26.2-1.fc11) Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2645 Lines: 76 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/