Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

hugetlb: show nr_huge_pages in report_hugepages()

The number of pre-allocated huge pages should be nr_huge_pages, not
free_huge_pages, although they are same during booting stage

Link: https://lkml.kernel.org/r/20250515114231.65824-1-xuwenjie04@baidu.com
Signed-off-by: Wenjie Xu <xuwenjie04@baidu.com>
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Acked-by: Oscar Salvador <osalvador@suse.de>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Wenjie Xu and committed by
Andrew Morton
3aefb1f0 11515590

+1 -1
+1 -1
mm/hugetlb.c
··· 3733 3733 3734 3734 string_get_size(huge_page_size(h), 1, STRING_UNITS_2, buf, 32); 3735 3735 pr_info("HugeTLB: registered %s page size, pre-allocated %ld pages\n", 3736 - buf, h->free_huge_pages); 3736 + buf, h->nr_huge_pages); 3737 3737 if (nrinvalid) 3738 3738 pr_info("HugeTLB: %s page size: %lu invalid page%s discarded\n", 3739 3739 buf, nrinvalid, nrinvalid > 1 ? "s" : "");