lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fc444f71-849c-48b1-8a1a-9bea6410ca8e@redhat.com>
Date: Mon, 18 Aug 2025 09:46:59 +0200
From: David Hildenbrand <david@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>, jane.chu@...cle.com
Cc: lirongqing <lirongqing@...du.com>, muchun.song@...ux.dev,
 osalvador@...e.de, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][v2] mm/hugetlb: early exit from
 hugetlb_pages_alloc_boot() when max_huge_pages=0

On 18.08.25 04:59, Andrew Morton wrote:
> On Sun, 17 Aug 2025 19:21:54 -0700 jane.chu@...cle.com wrote:
> 
>>
>> On 8/14/2025 3:23 AM, lirongqing wrote:
>>> From: Li RongQing <lirongqing@...du.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@...du.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@...hat.com>

-- 
Cheers

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ