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: <48a4a7f2-bee5-371a-1d9d-549fc59ce4f4@redhat.com>
Date:   Wed, 1 Jun 2022 12:49:28 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Muchun Song <songmuchun@...edance.com>, mike.kravetz@...cle.com
Cc:     akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, smuchun@...edance.com
Subject: Re: [PATCH 1/3] mm: hugetlb_vmemmap: cleanup hugetlb_vmemmap related
 functions

>>>  #endif
>>>  #ifdef CONFIG_CGROUP_HUGETLB
>>>  	/* cgroup control files */
>>> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>>> index dd642cfc538b..1f9fbdddc86b 100644
>>> --- a/mm/hugetlb.c
>>> +++ b/mm/hugetlb.c
>>> @@ -1540,7 +1540,7 @@ static void __update_and_free_page(struct hstate *h, struct page *page)
>>>  	if (hstate_is_gigantic(h) && !gigantic_page_runtime_supported())
>>>  		return;
>>>  
>>> -	if (alloc_huge_page_vmemmap(h, page)) {
>>> +	if (hugetlb_vmemmap_alloc(h, page)) {
>>>  		spin_lock_irq(&hugetlb_lock);
>>>  		/*
>>>  		 * If we cannot allocate vmemmap pages, just refuse to free the
>>> @@ -1617,7 +1617,7 @@ static DECLARE_WORK(free_hpage_work, free_hpage_workfn);
>>>  
>>>  static inline void flush_free_hpage_work(struct hstate *h)
>>>  {
>>> -	if (free_vmemmap_pages_per_hpage(h))
>>> +	if (hugetlb_optimize_vmemmap_pages(h))
>>
>> It might be reasonable to call that hugetlb_should_optimize_vmemmap()
>> then, letting it return a bool.
>>
> 
> How about the name of "hugetlb_vmemmap_optimizable()"?  "should" seems to
> tell the user that this hugetlb should be optimized, however, optimization
> also depends on "hugetlb_free_vmemmap=on".  "optimizable" seems to be more
> appropriate, right?

No strong opinion. Either is clearer to me compared to what we have
right now :)


-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ