The meaning persistent huge pages is ambiguous both in documentation and code implementation. About the bugfix, see the details in the commit message in patch 1 and 3. Additionally, code relevant with hstate:max_huge_pages can be simplified easily after the bugfix, do it in patch 2. v1 -> v2 1. Revise the commit message in patch 1. 3. Add fix tag in patch 3. 4. Add the patch 4 to correct documentation. Xueshi Hu (4): mm/hugetlb: fix the inconsistency of /proc/sys/vm/nr_huge_pages mm/hugeltb: clean up hstate::max_huge_pages mm/hugeltb: fix nodes huge page allocation when there are surplus pages docs: hugetlbpage.rst: make the meaning of persistent hugetlb pages clear Documentation/admin-guide/mm/hugetlbpage.rst | 31 ++++++++++---------- fs/hugetlbfs/inode.c | 2 +- mm/hugetlb.c | 30 ++++++------------- 3 files changed, 26 insertions(+), 37 deletions(-) -- 2.40.1