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:   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

Powered by Openwall GNU/*/Linux Powered by OpenVZ