From: Miaohe Lin <linmiaohe@huawei.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm/hugetlb: remove redundant reservation check condition in alloc_huge_page()
Date: Thu, 18 Feb 2021 10:27:07 +0800 [thread overview]
Message-ID: <9cd0da77-65c3-5ba2-f882-b54a1950bf39@huawei.com> (raw)
In-Reply-To: <32f628d5-fa0c-2a81-2de4-d0a76d1c3e45@oracle.com>
Hi:
On 2021/2/13 9:15, Mike Kravetz wrote:
> On 2/9/21 11:54 PM, Miaohe Lin wrote:
>> If there is no reservation corresponding to a vma, map_chg is always != 0,
>> i.e. we can not meet the condition where a vma does not have reservation
>> while map_chg = 0.
>
> This commit message might be easier to understand?
>
> vma_resv_map(vma) checks if a reserve map is associated with the vma. The
> routine vma_needs_reservation() will check vma_resv_map(vma) and return 1
> if no reserv map is present. map_chg is set to the return value of
> vma_needs_reservation(). Therefore, !vma_resv_map(vma) is redundant in the
> expression:
> map_chg || avoid_reserve || !vma_resv_map(vma);
> Remove the redundant check.
>
Sorry for late respond! I will use this wonderful commit message. Many thanks! :)
prev parent reply other threads:[~2021-02-18 2:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 7:54 Miaohe Lin
2021-02-13 1:15 ` Mike Kravetz
2021-02-18 2:27 ` Miaohe Lin [this message]
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=9cd0da77-65c3-5ba2-f882-b54a1950bf39@huawei.com \
--to=linmiaohe@huawei.com \
--cc=akpm@linux-foundation.org \
--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