From: "Xu, Yanfei" <yanfei.xu@windriver.com>
To: David Hildenbrand <david@redhat.com>,
mike.kravetz@oracle.com, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/hugetlb: remove a meaningless if statement in gigantic page initialization
Date: Tue, 2 Feb 2021 18:19:21 +0800 [thread overview]
Message-ID: <0837b5cc-2eb0-4316-8595-34f92a43035c@windriver.com> (raw)
In-Reply-To: <18d3db7b-da3c-db14-ab99-b2c966c70024@redhat.com>
On 2/2/21 6:06 PM, David Hildenbrand wrote:
> [Please note: This e-mail is from an EXTERNAL e-mail address]
>
> On 02.02.21 11:12, yanfei.xu@windriver.com wrote:
>> From: Yanfei Xu <yanfei.xu@windriver.com>
>>
>> Gigantic page is a compound page and its order is more than 1.
>> Thus it must be available for hpage_pincount. Let's remove this
>> meaningless if statement.
>>
>> Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
>> ---
>> mm/hugetlb.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>> index a3e4fa2c5e94..73d602f8c7e2 100644
>> --- a/mm/hugetlb.c
>> +++ b/mm/hugetlb.c
>> @@ -1501,9 +1501,7 @@ static void prep_compound_gigantic_page(struct
>> page *page, unsigned int order)
>> set_compound_head(p, page);
>> }
>> atomic_set(compound_mapcount_ptr(page), -1);
>> -
>> - if (hpage_pincount_available(page))
>> - atomic_set(compound_pincount_ptr(page), 0);
>> + atomic_set(compound_pincount_ptr(page), 0);
>> }
>>
>> /*
>>
>
> I can spot similar handling in destroy_compound_gigantic_page(). If this
> is correct (which I think it is), we should tackle both occurrences at
> once.
>
Agree. Will do it in v2.
Thanks,
Yanfei
> --
> Thanks,
>
> David / dhildenb
>
prev parent reply other threads:[~2021-02-02 10:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 10:12 yanfei.xu
2021-02-02 10:06 ` David Hildenbrand
2021-02-02 10:19 ` Xu, Yanfei [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=0837b5cc-2eb0-4316-8595-34f92a43035c@windriver.com \
--to=yanfei.xu@windriver.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.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