lkml.org 
[lkml]   [2021]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm/hugetlb: avoid unnecessary hugetlb_acct_memory() call
From
Date
On 15.01.21 03:04, Miaohe Lin wrote:
> Hi:
>
> On 2021/1/15 3:16, Mike Kravetz wrote:
>> On 1/14/21 4:32 AM, David Hildenbrand wrote:
>>> On 14.01.21 12:31, Miaohe Lin wrote:
>>>> When gbl_reserve is 0, hugetlb_acct_memory() will do nothing except holding
>>>> and releasing hugetlb_lock.
>>>
>>> So, what's the deal then? Adding more code?
>>>
>>> If this is a performance improvement, we should spell it out. Otherwise
>>> I don't see a real benefit of this patch.
>>>
>>
>> Thanks for finding/noticing this.
>>
>> As David points out, the commit message should state that this is a
>> performance improvement. Mention that such a change avoids an unnecessary
>> hugetlb_lock lock/unlock cycle. You can also mention that this unnecessary
>> lock cycle is happening on 'most' hugetlb munmap operations.
>>
>
> My bad. I should spell this out explicitly. Many thanks for both of you.

With the "lock cycle is happening on 'most' hugetlb munmap operations"
part added

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

Thanks!

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2021-01-15 09:50    [W:0.057 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site