lkml.org 
[lkml]   [2022]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/16] mm/huge_memory: check pmd_present first in is_huge_zero_pmd
On Thu, Jun 23, 2022 at 01:06:21AM +0800, Miaohe Lin wrote:
> When pmd is non-present, pmd_pfn returns an insane value. So we should

Although it does not cause any problems, it is better to check pmd_present()
in advance. The change looks good to me. So

> check pmd_present first to avoid acquiring such insane value and also
> avoid touching possible cold huge_zero_pfn cache line when pmd isn't
> present.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Reviewed-by: Muchun Song <songmuchun@bytedance.com>

\
 
 \ /
  Last update: 2022-06-23 09:00    [W:0.158 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site