lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTinwjNpAg6y3n1ZzAtPIv-sJE_P7WjbzzrRRCBVD@mail.gmail.com>
Date:	Sat, 29 May 2010 21:33:02 +0800
From:	Changli Gao <xiaosuo@...il.com>
To:	Borislav Petkov <bp@...en8.de>, Changli Gao <xiaosuo@...il.com>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] fs: optimize mpage_bio_submit()

On Sat, May 29, 2010 at 8:47 PM, Borislav Petkov <bp@...en8.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@...il.com)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ