Re: [PATCH v3 2/6] mm/huge_memory.c: make get_huge_zero_page() return bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  mm/huge_memory.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
LGTM. Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>

—
Best Regards,
Yan Zi

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux