[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <58D68134-E068-466C-AAD8-FA69596E8C26@oracle.com>
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