[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d5ea6179-7e0d-7727-50d2-efa694ba84b3@redhat.com>
Date: Fri, 15 Jan 2021 09:47:44 +0100
From: David Hildenbrand <david@...hat.com>
To: Miaohe Lin <linmiaohe@...wei.com>,
Mike Kravetz <mike.kravetz@...cle.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] mm/hugetlb: avoid unnecessary hugetlb_acct_memory() call
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@...hat.com>
Thanks!
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists