[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65D8C66C-B8A7-4FC6-A658-5932097453F3@nvidia.com>
Date: Thu, 18 Mar 2021 10:00:32 -0400
From: "Zi Yan" <ziy@...dia.com>
To: "Miaohe Lin" <linmiaohe@...wei.com>
Cc: akpm@...ux-foundation.org, willy@...radead.org,
william.kucharski@...cle.com, vbabka@...e.cz, peterx@...hat.com,
yulei.kernel@...il.com, walken@...gle.com,
aneesh.kumar@...ux.ibm.com, rcampbell@...dia.com,
thomas_os@...pmail.org, yang.shi@...ux.alibaba.com,
richard.weiyang@...ux.alibaba.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH v3 2/6] mm/huge_memory.c: make get_huge_zero_page() return
bool
On 18 Mar 2021, at 8:27, Miaohe Lin wrote:
> It's guaranteed that huge_zero_page will not be NULL if huge_zero_refcount
> is increased successfully. When READ_ONCE(huge_zero_page) is returned,
> there must be a huge_zero_page and it can be replaced with returning 'true'
> when we do not care about the value of huge_zero_page. We can thus make it
> return bool to save READ_ONCE cpu cycles as the return value is just used
> to check if huge_zero_page exists.
>
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
> mm/huge_memory.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
LGTM. Reviewed-by: Zi Yan <ziy@...dia.com>
—
Best Regards,
Yan Zi
Download attachment "signature.asc" of type "application/pgp-signature" (855 bytes)
Powered by blists - more mailing lists