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]
Date:   Mon, 22 Jul 2019 16:53:53 -0600
From:   William Kucharski <william.kucharski@...cle.com>
To:     Bharath Vedartham <linux.bhar@...il.com>
Cc:     arnd@...db.de, sivanich@....com, gregkh@...uxfoundation.org,
        ira.weiny@...el.com, jhubbard@...dia.com, jglisse@...hat.com,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 2/3] sgi-gru: Remove CONFIG_HUGETLB_PAGE ifdef



> On Jul 22, 2019, at 11:50 AM, Bharath Vedartham <linux.bhar@...il.com> wrote:
> 
>> 
>> 
>> In all likelihood, these questions are no-ops, and the optimizer may even make my questions completely moot, but I thought I might as well ask anyway.
>> 
> That sounds reasonable. I am not really sure as to how much of 
> an improvement it would be, the condition will be evaluated eitherways
> AFAIK? Eitherways, the ternary operator does not look good. I ll make a
> version 2 of this.

In THEORY the "unlikely" hints to the compiler that that leg of the "if" can be made the branch and jump leg, though in reality optimization is much more complex than that.

Still, the unlikely() call is also nicely self-documenting as to what the expected outcome is.

Reviewed-by: William Kucharski <william.kucharski@...cle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ