From mboxrd@z Thu Jan 1 00:00:00 1970 From: Changli Gao Subject: Re: [PATCH 2/2] fs: optimize mpage_bio_submit() Date: Sat, 29 May 2010 21:33:02 +0800 Message-ID: References: <1275095966-18382-1-git-send-email-xiaosuo@gmail.com> <20100529124735.GB25092@liondog.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE To: Borislav Petkov , Changli Gao , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Return-path: Received: from mail-pv0-f174.google.com ([74.125.83.174]:57499 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752106Ab0E2NdX convert rfc822-to-8bit (ORCPT ); Sat, 29 May 2010 09:33:23 -0400 In-Reply-To: <20100529124735.GB25092@liondog.tnic> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, May 29, 2010 at 8:47 PM, Borislav Petkov wrote: > > ok, can you sincerely tell me that your change makes the code more > readable? And have you checked to see what the compiler actually > "optimizes"? > > original code: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0movq =C2=A0 =C2=A0$mpage_end_io_read, %rdx= =C2=A0 =C2=A0 =C2=A0 =C2=A0#, tmp65 > =C2=A0 =C2=A0 =C2=A0 =C2=A0movq =C2=A0 =C2=A0$mpage_end_io_write, %ra= x =C2=A0 =C2=A0 =C2=A0 #, tmp64 > =C2=A0 =C2=A0 =C2=A0 =C2=A0cmpl =C2=A0 =C2=A0$1, %edi =C2=A0 =C2=A0 =C2= =A0 =C2=A0#, rw > =C2=A0 =C2=A0 =C2=A0 =C2=A0cmovne =C2=A0%rdx, %rax =C2=A0 =C2=A0 =C2=A0= # tmp65,, tmp64 > =C2=A0 =C2=A0 =C2=A0 =C2=A0movq =C2=A0 =C2=A0%rax, 80(%rsi) =C2=A0# t= mp64, .bi_end_io > =C2=A0 =C2=A0 =C2=A0 =C2=A0.loc 1 91 0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0call =C2=A0 =C2=A0submit_bio =C2=A0 =C2=A0= =C2=A0# > > your change: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0movq =C2=A0 =C2=A0$mpage_end_io_read, %rdx= =C2=A0 =C2=A0 =C2=A0 =C2=A0#, tmp63 > =C2=A0 =C2=A0 =C2=A0 =C2=A0movq =C2=A0 =C2=A0$mpage_end_io_write, %ra= x =C2=A0 =C2=A0 =C2=A0 #, iftmp.561 > =C2=A0 =C2=A0 =C2=A0 =C2=A0cmpl =C2=A0 =C2=A0$1, %edi =C2=A0 =C2=A0 =C2= =A0 =C2=A0#, rw > =C2=A0 =C2=A0 =C2=A0 =C2=A0cmovne =C2=A0%rdx, %rax =C2=A0 =C2=A0 =C2=A0= # tmp63,, iftmp.561 > =C2=A0 =C2=A0 =C2=A0 =C2=A0movq =C2=A0 =C2=A0%rax, 80(%rsi) =C2=A0# i= ftmp.561, .bi_end_io > =C2=A0 =C2=A0 =C2=A0 =C2=A0.loc 1 90 0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0call =C2=A0 =C2=A0submit_bio =C2=A0 =C2=A0= =C2=A0# > > so that change does nothing except obfuscating the source a bit more = so > that you get more headaches whenever you look at it. > Oh, I didn't check the asm code. Compiler is smarter than I thought. Thanks for your explaining. --=20 Regards=EF=BC=8C Changli Gao(xiaosuo@gmail.com) -- 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