linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>, jane.chu@oracle.com
Cc: lirongqing <lirongqing@baidu.com>,
	muchun.song@linux.dev, osalvador@suse.de, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][v2] mm/hugetlb: early exit from hugetlb_pages_alloc_boot() when max_huge_pages=0
Date: Mon, 18 Aug 2025 09:46:59 +0200	[thread overview]
Message-ID: <fc444f71-849c-48b1-8a1a-9bea6410ca8e@redhat.com> (raw)
In-Reply-To: <20250817195945.a845d2f5c045e4f60b07469f@linux-foundation.org>

On 18.08.25 04:59, Andrew Morton wrote:
> On Sun, 17 Aug 2025 19:21:54 -0700 jane.chu@oracle.com wrote:
> 
>>
>> On 8/14/2025 3:23 AM, lirongqing wrote:
>>> From: Li RongQing <lirongqing@baidu.com>
>>>
>>> Optimize hugetlb_pages_alloc_boot() to return immediately when
>>> max_huge_pages is 0, avoiding unnecessary CPU cycles and the below
>>> log message when hugepages aren't configured in the kernel command
>>> line.
>>> [    3.702280] HugeTLB: allocation took 0ms with hugepage_allocation_threads=32
>>>
>>> Signed-off-by: Li RongQing <lirongqing@baidu.com>
>>> ---
>>> diff with v1: adding the reduced log messages in commit header
>>>
>>>    mm/hugetlb.c | 3 +++
>>>    1 file changed, 3 insertions(+)
>>>
>>> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>>> index 753f99b..514fab5 100644
>>> --- a/mm/hugetlb.c
>>> +++ b/mm/hugetlb.c
>>> @@ -3654,6 +3654,9 @@ static void __init hugetlb_hstate_alloc_pages(struct hstate *h)
>>>    		return;
>>>    	}
>>>    
>>> +	if (!h->max_huge_pages)
>>> +		return;
>>> +
>>>    	/* do node specific alloc */
>>>    	if (hugetlb_hstate_alloc_pages_specific_nodes(h))
>>>    		return;
>>
>> Looks good.  Could you add stable: ?

Can you elaborate why you think this is stable material?

> 
> Sure, I did that.

I don't think this is stable material, but for the change itself

Acked-by: David Hildenbrand <david@redhat.com>

-- 
Cheers

David / dhildenb



  reply	other threads:[~2025-08-18  7:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 10:23 lirongqing
2025-08-15  7:02 ` Dev Jain
2025-08-18  2:21 ` jane.chu
2025-08-18  2:59   ` Andrew Morton
2025-08-18  7:46     ` David Hildenbrand [this message]
2025-08-19 22:59       ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc444f71-849c-48b1-8a1a-9bea6410ca8e@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=jane.chu@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lirongqing@baidu.com \
    --cc=muchun.song@linux.dev \
    --cc=osalvador@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox