hugetlb: add comment for subtle SetHPageVmemmapOptimized()
JIRA: https://issues.redhat.com/browse/RHEL-1848 commit a9e1eab241bdaadd56b6cfdc481cff6a24c4799b Author: Miaohe Lin <linmiaohe@huawei.com> Date: Thu Sep 1 20:00:28 2022 +0800 hugetlb: add comment for subtle SetHPageVmemmapOptimized() The SetHPageVmemmapOptimized() called here seems unnecessary as it's assumed to be set when calling this function. But it's indeed cleared by above set_page_private(page, 0). Add a comment to avoid possible future confusion. Link: https://lkml.kernel.org/r/20220901120030.63318-9-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Chris von Recklinghausen <crecklin@redhat.com>
This commit is contained in:
parent
3f0895872f
commit
b7b229594c
|
@ -1516,6 +1516,10 @@ static void add_hugetlb_page(struct hstate *h, struct page *page,
|
|||
|
||||
set_compound_page_dtor(page, HUGETLB_PAGE_DTOR);
|
||||
set_page_private(page, 0);
|
||||
/*
|
||||
* We have to set HPageVmemmapOptimized again as above
|
||||
* set_page_private(page, 0) cleared it.
|
||||
*/
|
||||
SetHPageVmemmapOptimized(page);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue