linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Changli Gao <xiaosuo@gmail.com>
To: Borislav Petkov <bp@alien8.de>, Changli Gao <xiaosuo@gmail.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] fs: optimize mpage_bio_submit()
Date: Sat, 29 May 2010 21:33:02 +0800	[thread overview]
Message-ID: <AANLkTinwjNpAg6y3n1ZzAtPIv-sJE_P7WjbzzrRRCBVD@mail.gmail.com> (raw)
In-Reply-To: <20100529124735.GB25092@liondog.tnic>

On Sat, May 29, 2010 at 8:47 PM, Borislav Petkov <bp@alien8.de> 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:
>
>        movq    $mpage_end_io_read, %rdx        #, tmp65
>        movq    $mpage_end_io_write, %rax       #, tmp64
>        cmpl    $1, %edi        #, rw
>        cmovne  %rdx, %rax      # tmp65,, tmp64
>        movq    %rax, 80(%rsi)  # tmp64, <variable>.bi_end_io
>        .loc 1 91 0
>        call    submit_bio      #
>
> your change:
>
>        movq    $mpage_end_io_read, %rdx        #, tmp63
>        movq    $mpage_end_io_write, %rax       #, iftmp.561
>        cmpl    $1, %edi        #, rw
>        cmovne  %rdx, %rax      # tmp63,, iftmp.561
>        movq    %rax, 80(%rsi)  # iftmp.561, <variable>.bi_end_io
>        .loc 1 90 0
>        call    submit_bio      #
>
> 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.


-- 
Regards,
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

  reply	other threads:[~2010-05-29 13:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-29  1:19 [PATCH 2/2] fs: optimize mpage_bio_submit() Changli Gao
2010-05-29 12:47 ` Borislav Petkov
2010-05-29 13:33   ` Changli Gao [this message]
2010-05-29 13:43     ` Borislav Petkov

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=AANLkTinwjNpAg6y3n1ZzAtPIv-sJE_P7WjbzzrRRCBVD@mail.gmail.com \
    --to=xiaosuo@gmail.com \
    --cc=bp@alien8.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).