From: Oscar Salvador <osalvador@suse.de>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-mm@kvack.org, Daniel Jordan <daniel.m.jordan@oracle.com>,
Zi Yan <ziy@nvidia.com>, John Hubbard <jhubbard@nvidia.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC V2] mm/vmstat: Add events for HugeTLB migration
Date: Wed, 30 Sep 2020 09:46:46 +0200 [thread overview]
Message-ID: <20200930074639.GA26786@linux> (raw)
In-Reply-To: <1601445649-22163-1-git-send-email-anshuman.khandual@arm.com>
On Wed, Sep 30, 2020 at 11:30:49AM +0530, Anshuman Khandual wrote:
> - is_thp = PageTransHuge(page) && !PageHuge(page);
> - nr_subpages = thp_nr_pages(page);
> + is_thp = false;
> + is_hugetlb = false;
> + if (PageTransHuge(page)) {
> + if (PageHuge(page))
> + is_hugetlb = true;
> + else
> + is_thp = true;
> + }
Since PageHuge only returns true for hugetlb pages, I think the following is
more simple?
if (PageHuge(page))
is_hugetlb = true;
else if (PageTransHuge(page))
is_thp = true
Besides that, it looks good to me:
Reviewed-by: Oscar Salvador <osalvador@suse.de>
--
Oscar Salvador
SUSE L3
next prev parent reply other threads:[~2020-09-30 7:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 6:00 [RFC V2] mm/vmstat: Add events for HugeTLB migration Anshuman Khandual
2020-09-30 7:46 ` Oscar Salvador [this message]
2020-09-30 10:02 ` Anshuman Khandual
2020-09-30 10:33 ` Oscar Salvador
2020-10-01 22:16 ` Mike Kravetz
2020-10-02 12:04 ` Michal Hocko
2020-10-05 2:29 ` Anshuman Khandual
2020-10-05 6:05 ` Michal Hocko
2020-10-06 2:56 ` Anshuman Khandual
2020-10-06 7:54 ` Michal Hocko
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=20200930074639.GA26786@linux \
--to=osalvador@suse.de \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=daniel.m.jordan@oracle.com \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=ziy@nvidia.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).