lkml.org 
[lkml]   [2021]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] mm/hugetlb: avoid unnecessary hugetlb_acct_memory() call
On Fri, Jan 15, 2021 at 04:20:13AM -0500, Miaohe Lin wrote:
> When gbl_reserve is 0, hugetlb_acct_memory() will do nothing except holding
> and releasing hugetlb_lock. We should avoid this unnecessary hugetlb_lock
> lock/unlock cycle which is happening on 'most' hugetlb munmap operations by
> check delta against 0 at the beginning of hugetlb_acct_memory.
>
> Reviewed-by: David Hildenbrand <david@redhat.com>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

I would avoid mentioning gbl_reserve as not all callers use it, and focus
on what delta means:

"When reservation accounting remains unchanged..", but anyway:

Reviewed-by: Oscar Salvador <osalvador@suse.de>


--
Oscar Salvador
SUSE L3

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