From: Oscar Salvador <osalvador@suse.de>
To: Miaohe Lin <linmiaohe@huawei.com>
Cc: akpm@linux-foundation.org, mike.kravetz@oracle.com,
david@redhat.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm/hugetlb: avoid unnecessary hugetlb_acct_memory() call
Date: Fri, 15 Jan 2021 10:28:49 +0100 [thread overview]
Message-ID: <20210115092849.GC4092@linux> (raw)
In-Reply-To: <20210115092013.61012-1-linmiaohe@huawei.com>
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
next prev parent reply other threads:[~2021-01-15 9:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 9:20 [PATCH v2] mm/hugetlb: avoid unnecessary hugetlb_acct_memory() call Miaohe Lin
2021-01-15 9:28 ` Oscar Salvador [this message]
2021-01-15 9:44 ` Miaohe Lin
2021-01-19 17:44 ` Mike Kravetz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210115092849.GC4092@linux \
--to=osalvador@suse.de \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).