linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hugetlb: Show nr_huge_pages in report_hugepages()
@ 2025-05-15 11:42 Wenjie Xu
  2025-05-20 11:27 ` Oscar Salvador
  0 siblings, 1 reply; 2+ messages in thread
From: Wenjie Xu @ 2025-05-15 11:42 UTC (permalink / raw)
  To: muchun.song, osalvador, akpm
  Cc: linux-mm, linux-kernel, Wenjie Xu, Li RongQing

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

Signed-off-by: Wenjie Xu <xuwenjie04@baidu.com>
Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 mm/hugetlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 6ea1be71aa42..2a4d4551749a 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3740,7 +3740,7 @@ static void __init report_hugepages(void)
 
 		string_get_size(huge_page_size(h), 1, STRING_UNITS_2, buf, 32);
 		pr_info("HugeTLB: registered %s page size, pre-allocated %ld pages\n",
-			buf, h->free_huge_pages);
+			buf, h->nr_huge_pages);
 		if (nrinvalid)
 			pr_info("HugeTLB: %s page size: %lu invalid page%s discarded\n",
 					buf, nrinvalid, nrinvalid > 1 ? "s" : "");
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hugetlb: Show nr_huge_pages in report_hugepages()
  2025-05-15 11:42 [PATCH] hugetlb: Show nr_huge_pages in report_hugepages() Wenjie Xu
@ 2025-05-20 11:27 ` Oscar Salvador
  0 siblings, 0 replies; 2+ messages in thread
From: Oscar Salvador @ 2025-05-20 11:27 UTC (permalink / raw)
  To: Wenjie Xu; +Cc: muchun.song, akpm, linux-mm, linux-kernel, Li RongQing

On Thu, May 15, 2025 at 07:42:31PM +0800, Wenjie Xu wrote:
> The number of pre-allocated huge pages should be nr_huge_pages, not
> free_huge_pages, although they are same during booting stage
> 
> Signed-off-by: Wenjie Xu <xuwenjie04@baidu.com>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>

Acked-by: Oscar Salvador <osalvador@suse.de>


-- 
Oscar Salvador
SUSE Labs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-20 11:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15 11:42 [PATCH] hugetlb: Show nr_huge_pages in report_hugepages() Wenjie Xu
2025-05-20 11:27 ` Oscar Salvador

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).