From: Mike Kravetz <mike.kravetz@oracle.com>
To: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
akpm@linux-foundation.org, songmuchun@bytedance.com,
willy@infradead.org, almasrymina@google.com,
linmiaohe@huawei.com, minhquangbui99@gmail.com,
aneesh.kumar@linux.ibm.com
Subject: Re: [PATCH 2/9] mm/hugetlb_cgroup: convert hugetlb_cgroup_from_page() to folios
Date: Mon, 31 Oct 2022 09:13:20 -0700 [thread overview]
Message-ID: <Y1/0IOuAyu12/C9o@monkey> (raw)
In-Reply-To: <20221014031303.231740-3-sidhartha.kumar@oracle.com>
On 10/13/22 20:12, Sidhartha Kumar wrote:
> Introduce folios in __remove_hugetlb_page() by converting
> hugetlb_cgroup_from_page() to use folios.
>
> Also gets rid of unsed hugetlb_cgroup_from_page_resv() function.
>
> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
> ---
> include/linux/hugetlb_cgroup.h | 39 +++++++++++++++++-----------------
> mm/hugetlb.c | 5 +++--
> mm/hugetlb_cgroup.c | 13 +++++++-----
> 3 files changed, 31 insertions(+), 26 deletions(-)
Changes look fine. However ...
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 4133ffbbeb50..bcb9bfce32ee 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -1434,9 +1434,10 @@ static void __remove_hugetlb_page(struct hstate *h, struct page *page,
> bool demote)
> {
> int nid = page_to_nid(page);
> + struct folio *folio = page_folio(page);
>
> - VM_BUG_ON_PAGE(hugetlb_cgroup_from_page(page), page);
> - VM_BUG_ON_PAGE(hugetlb_cgroup_from_page_rsvd(page), page);
> + VM_BUG_ON_FOLIO(hugetlb_cgroup_from_folio(folio), folio);
> + VM_BUG_ON_FOLIO(hugetlb_cgroup_from_folio_rsvd(folio), folio);
>
> lockdep_assert_held(&hugetlb_lock);
> if (hstate_is_gigantic(h) && !gigantic_page_runtime_supported())
... there is also this a little further in the routine.
if (HPageFreed(page)) {
Should probably change this to?
if (folio_test_hugetlb_freed(folio)) {
Or, is that part of a planned subsequent change?
--
Mike Kravetz
next prev parent reply other threads:[~2022-10-31 16:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 3:12 [PATCH 0/9] convert hugetlb_cgroup helper functions to folios Sidhartha Kumar
2022-10-14 3:12 ` [PATCH 1/9] mm/hugetlb_cgroup: convert __set_hugetlb_cgroup() " Sidhartha Kumar
2022-10-31 14:51 ` Mike Kravetz
2022-10-14 3:12 ` [PATCH 2/9] mm/hugetlb_cgroup: convert hugetlb_cgroup_from_page() " Sidhartha Kumar
2022-10-31 16:13 ` Mike Kravetz [this message]
2022-11-01 16:40 ` Sidhartha Kumar
2022-10-14 3:12 ` [PATCH 3/9] mm/hugetlb_cgroup: convert set_hugetlb_cgroup*() " Sidhartha Kumar
2022-10-31 16:38 ` Mike Kravetz
2022-11-01 16:43 ` Sidhartha Kumar
2022-10-14 3:12 ` [PATCH 4/9] mm/hugetlb_cgroup: convert hugetlb_cgroup_migrate " Sidhartha Kumar
2022-10-31 16:50 ` Mike Kravetz
2022-10-14 3:12 ` [PATCH 5/9] mm/hugetlb: convert isolate_or_dissolve_huge_page " Sidhartha Kumar
2022-10-31 19:37 ` Mike Kravetz
2022-10-14 3:13 ` [PATCH 6/9] mm/hugetlb: convert free_huge_page " Sidhartha Kumar
2022-10-17 20:36 ` Andrew Morton
2022-10-31 19:44 ` Mike Kravetz
2022-10-14 3:13 ` [PATCH 7/9] mm/hugetlb_cgroup: convert hugetlb_cgroup_uncharge_page() " Sidhartha Kumar
2022-10-31 20:11 ` Mike Kravetz
2022-10-14 3:13 ` [PATCH 8/9] mm/hugeltb_cgroup: convert hugetlb_cgroup_commit_charge*() " Sidhartha Kumar
2022-10-31 20:22 ` Mike Kravetz
2022-10-14 3:13 ` [PATCH 9/9] mm/hugetlb: convert move_hugetlb_state() " Sidhartha Kumar
2022-10-31 20:56 ` 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=Y1/0IOuAyu12/C9o@monkey \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=almasrymina@google.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minhquangbui99@gmail.com \
--cc=sidhartha.kumar@oracle.com \
--cc=songmuchun@bytedance.com \
--cc=willy@infradead.org \
/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).