From: David Hildenbrand <david@redhat.com>
To: yanfei.xu@windriver.com, mike.kravetz@oracle.com,
akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm/hugetlb: remove redundant check in preparing and destroying gigantic page
Date: Fri, 5 Feb 2021 09:15:33 +0100 [thread overview]
Message-ID: <2f54a29c-9d81-e8bd-2d37-779cb2be6b21@redhat.com> (raw)
In-Reply-To: <20210202112002.73170-1-yanfei.xu@windriver.com>
On 02.02.21 12:20, 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 the
> redundant check for gigantic page.
>
> Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
> ---
> mm/hugetlb.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index a3e4fa2c5e94..dac5db569ccb 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -1219,8 +1219,7 @@ static void destroy_compound_gigantic_page(struct page *page,
> struct page *p = page + 1;
>
> atomic_set(compound_mapcount_ptr(page), 0);
> - if (hpage_pincount_available(page))
> - atomic_set(compound_pincount_ptr(page), 0);
> + atomic_set(compound_pincount_ptr(page), 0);
>
> for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) {
> clear_compound_head(p);
> @@ -1501,9 +1500,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);
> }
>
> /*
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2021-02-05 8:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 11:20 yanfei.xu
2021-02-02 12:19 ` Xu, Yanfei
2021-02-02 19:03 ` Mike Kravetz
2021-02-05 8:15 ` David Hildenbrand [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=2f54a29c-9d81-e8bd-2d37-779cb2be6b21@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=yanfei.xu@windriver.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