From: Yang Shi <yang@os.amperecomputing.com>
To: nifan.cxl@gmail.com, rostedt@goodmis.org, mhiramat@kernel.org,
willy@infradead.org
Cc: akpm@linux-foundation.org, david@redhat.com, fan.ni@samsung.com,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-mm@kvack.org, npache@redhat.com, mcgrof@kernel.org,
a.manzanares@samsung.com, dave@stgolabs.net,
Baolin Wang <baolin.wang@linux.alibaba.com>
Subject: Re: [PATCH v2 1/2] khugepaged: Refactor trace_mm_collapse_huge_page_isolate() to take folio instead of page
Date: Mon, 21 Apr 2025 15:38:40 -0700 [thread overview]
Message-ID: <4cc73e33-f703-40af-9099-ebced9273778@os.amperecomputing.com> (raw)
In-Reply-To: <20250418183920.273154-1-nifan.cxl@gmail.com>
On 4/18/25 11:34 AM, nifan.cxl@gmail.com wrote:
> From: Fan Ni <fan.ni@samsung.com>
>
> trace_mm_collapse_huge_page_isolate() is only used in
> __collapse_huge_page_isolate(), which passes in the head page of a
> folio, so refactor it to take folio directly.
>
> Signed-off-by: Fan Ni <fan.ni@samsung.com>
> Reviewed-by: Nico Pache <npache@redhat.com>
> Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> ---
> v2:
> Picked up Reviewed-by tags;
> v1:
> https://lore.kernel.org/linux-mm/CAA1CXcB06JD9Fp4c7GGU3NHEm4W-aV7TS7JW7eWxshJEM4t2_w@mail.gmail.com/T/
> ---
Reviewed-by: Yang Shi <yang@os.amperecomputing.com>
> include/trace/events/huge_memory.h | 6 +++---
> mm/khugepaged.c | 4 ++--
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/include/trace/events/huge_memory.h b/include/trace/events/huge_memory.h
> index 9d5c00b0285c..a73699f000de 100644
> --- a/include/trace/events/huge_memory.h
> +++ b/include/trace/events/huge_memory.h
> @@ -116,10 +116,10 @@ TRACE_EVENT(mm_collapse_huge_page,
>
> TRACE_EVENT(mm_collapse_huge_page_isolate,
>
> - TP_PROTO(struct page *page, int none_or_zero,
> + TP_PROTO(struct folio *folio, int none_or_zero,
> int referenced, bool writable, int status),
>
> - TP_ARGS(page, none_or_zero, referenced, writable, status),
> + TP_ARGS(folio, none_or_zero, referenced, writable, status),
>
> TP_STRUCT__entry(
> __field(unsigned long, pfn)
> @@ -130,7 +130,7 @@ TRACE_EVENT(mm_collapse_huge_page_isolate,
> ),
>
> TP_fast_assign(
> - __entry->pfn = page ? page_to_pfn(page) : -1;
> + __entry->pfn = folio ? folio_pfn(folio) : -1;
> __entry->none_or_zero = none_or_zero;
> __entry->referenced = referenced;
> __entry->writable = writable;
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index b8838ba8207a..950d147cd95e 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -696,13 +696,13 @@ static int __collapse_huge_page_isolate(struct vm_area_struct *vma,
> result = SCAN_LACK_REFERENCED_PAGE;
> } else {
> result = SCAN_SUCCEED;
> - trace_mm_collapse_huge_page_isolate(&folio->page, none_or_zero,
> + trace_mm_collapse_huge_page_isolate(folio, none_or_zero,
> referenced, writable, result);
> return result;
> }
> out:
> release_pte_pages(pte, _pte, compound_pagelist);
> - trace_mm_collapse_huge_page_isolate(&folio->page, none_or_zero,
> + trace_mm_collapse_huge_page_isolate(folio, none_or_zero,
> referenced, writable, result);
> return result;
> }
next prev parent reply other threads:[~2025-04-21 22:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 18:34 nifan.cxl
2025-04-18 18:34 ` [PATCH v2 2/2] khugepaged: Refactor trace_mm_khugepaged_scan_pmd() " nifan.cxl
2025-04-21 2:54 ` Baolin Wang
2025-04-21 22:40 ` Yang Shi
2025-04-22 8:50 ` David Hildenbrand
2025-04-21 22:38 ` Yang Shi [this message]
2025-04-22 8:48 ` [PATCH v2 1/2] khugepaged: Refactor trace_mm_collapse_huge_page_isolate() " David Hildenbrand
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=4cc73e33-f703-40af-9099-ebced9273778@os.amperecomputing.com \
--to=yang@os.amperecomputing.com \
--cc=a.manzanares@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=dave@stgolabs.net \
--cc=david@redhat.com \
--cc=fan.ni@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mhiramat@kernel.org \
--cc=nifan.cxl@gmail.com \
--cc=npache@redhat.com \
--cc=rostedt@goodmis.org \
--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
all inboxes | Powered by JetHome®