]> git.baikalelectronics.ru Git - kernel.git/commit
hugetlbfs: fix issue of preallocation of gigantic pages can't work
authorZhenguo Yao <yaozhenguo1@gmail.com>
Fri, 10 Dec 2021 22:47:08 +0000 (14:47 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 11 Dec 2021 01:10:56 +0000 (17:10 -0800)
commit6663ca9b67c9b9d67a2a7f929ea261dc1a2eb6e3
treecdf4aeefd4e4e880d595607c67f50be1c4e06605
parent6b36fb85082e01b215ff237a47dd2a71589b24c3
hugetlbfs: fix issue of preallocation of gigantic pages can't work

Preallocation of gigantic pages can't work bacause of commit
8da90a50a54c ("hugetlbfs: extend the definition of hugepages parameter
to support node allocation").  When nid is NUMA_NO_NODE(-1),
alloc_bootmem_huge_page will always return without doing allocation.
Fix this by adding more check.

Link: https://lkml.kernel.org/r/20211129133803.15653-1-yaozhenguo1@gmail.com
Fixes: 8da90a50a54c ("hugetlbfs: extend the definition of hugepages parameter to support node allocation")
Signed-off-by: Zhenguo Yao <yaozhenguo1@gmail.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Tested-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c