lkml.org 
[lkml]   [2019]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] sgi-gru: Remove CONFIG_HUGETLB_PAGE ifdef
From
Date


> On Jul 22, 2019, at 11:50 AM, Bharath Vedartham <linux.bhar@gmail.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@oracle.com>

\
 
 \ /
  Last update: 2019-07-23 00:55    [W:0.106 / U:19.056 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site