From: Zi Yan <ziy@nvidia.com>
To: Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@redhat.com>,
linux-mm@kvack.org, Oscar Salvador <osalvador@suse.de>,
Vlastimil Babka <vbabka@suse.cz>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Mel Gorman <mgorman@techsingularity.net>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Brendan Jackman <jackmanb@google.com>,
Richard Chang <richardycc@google.com>,
linux-kernel@vger.kernel.org, Zi Yan <ziy@nvidia.com>
Subject: Re: [PATCH v3 4/4] mm/page_isolation: remove migratetype parameter from more functions.
Date: Thu, 08 May 2025 16:25:04 -0400 [thread overview]
Message-ID: <C4D87FA7-4B3D-440F-9E5F-B57561AB4FE8@nvidia.com> (raw)
In-Reply-To: <20250507211059.2211628-5-ziy@nvidia.com>
On 7 May 2025, at 17:10, Zi Yan wrote:
> migratetype is no longer overwritten during pageblock isolation,
> start_isolate_page_range(), has_unmovable_pages(), and
> set_migratetype_isolate() no longer need which migratetype to restore
> during isolation failure.
>
> For has_unmoable_pages(), it needs to know if the isolation is for CMA
> allocation, so adding CMA_ALLOCATION to isolation flags to provide the
> information.
>
> alloc_contig_range() no longer needs migratetype. Replace it with
> a newly defined acr_flags_t to tell if an allocation is for CMA. So does
> __alloc_contig_migrate_range().
>
> Signed-off-by: Zi Yan <ziy@nvidia.com>
> ---
> drivers/virtio/virtio_mem.c | 3 +--
> include/linux/gfp.h | 6 +++++-
> include/linux/page-isolation.h | 15 +++++++++++---
> include/trace/events/kmem.h | 14 +++++++------
> mm/cma.c | 2 +-
> mm/memory_hotplug.c | 1 -
> mm/page_alloc.c | 22 ++++++++++-----------
> mm/page_isolation.c | 36 ++++++++++++----------------------
> 8 files changed, 50 insertions(+), 49 deletions(-)
Here is the fixup 3/3 to address the type issue reported by kernel test robot.
From 3c439f1f09b03c8362b43c0ac05e5f174f1a6655 Mon Sep 17 00:00:00 2001
From: Zi Yan <ziy@nvidia.com>
Date: Thu, 8 May 2025 15:42:18 -0400
Subject: [PATCH] fixup for mm/page_isolation: remove migratetype parameter
from more functions.
1. fixed test_pages_isolated() and __test_page_isolated_in_pageblock()
signature by using the new isol_flags_t type.
2. fixed test_pages_isolated() doc: flags -> isol_flags
Signed-off-by: Zi Yan <ziy@nvidia.com>
---
include/linux/page-isolation.h | 2 +-
mm/page_isolation.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h
index c176c938da87..20c3f98b5afb 100644
--- a/include/linux/page-isolation.h
+++ b/include/linux/page-isolation.h
@@ -45,5 +45,5 @@ int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
void undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn);
int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
- int isol_flags);
+ isol_flags_t isol_flags);
#endif
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index a9d0e75db95d..5f00d7113766 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -563,7 +563,7 @@ void undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn)
*/
static unsigned long
__test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn,
- int flags)
+ isol_flags_t flags)
{
struct page *page;
@@ -602,7 +602,7 @@ __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn,
*
* This tests if all in the specified range are free.
*
- * If %MEMORY_OFFLINE is specified in @flags, it will consider
+ * If %MEMORY_OFFLINE is specified in @isol_flags, it will consider
* poisoned and offlined pages free as well.
*
* Caller must ensure the requested range doesn't span zones.
@@ -610,7 +610,7 @@ __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn,
* Returns 0 if true, -EBUSY if one or more pages are in use.
*/
int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
- int isol_flags)
+ isol_flags_t isol_flags)
{
unsigned long pfn, flags;
struct page *page;
--
2.47.2
Best Regards,
Yan, Zi
next prev parent reply other threads:[~2025-05-08 20:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 21:10 [PATCH v3 0/4] Make MIGRATE_ISOLATE a standalone bit Zi Yan
2025-05-07 21:10 ` [PATCH v3 1/4] mm/page_isolation: make page isolation " Zi Yan
2025-05-08 5:24 ` Johannes Weiner
2025-05-08 15:27 ` Zi Yan
2025-05-08 19:17 ` Zi Yan
2025-05-08 20:46 ` Johannes Weiner
2025-05-08 20:53 ` Zi Yan
2025-05-09 1:33 ` Zi Yan
2025-05-09 12:48 ` Zi Yan
2025-05-08 20:22 ` Zi Yan
2025-05-08 21:13 ` Johannes Weiner
2025-05-09 13:57 ` Zi Yan
2025-05-07 21:10 ` [PATCH v3 2/4] mm/page_isolation: remove migratetype from move_freepages_block_isolate() Zi Yan
2025-05-08 20:23 ` Zi Yan
2025-05-07 21:10 ` [PATCH v3 3/4] mm/page_isolation: remove migratetype from undo_isolate_page_range() Zi Yan
2025-05-08 21:12 ` Johannes Weiner
2025-05-07 21:10 ` [PATCH v3 4/4] mm/page_isolation: remove migratetype parameter from more functions Zi Yan
2025-05-08 20:25 ` Zi Yan [this message]
2025-05-09 1:56 ` Zi Yan
2025-05-09 16:01 ` Zi Yan
2025-05-08 21:11 ` Johannes Weiner
2025-05-08 22:15 ` Zi Yan
2025-05-08 4:38 ` [PATCH v3 0/4] Make MIGRATE_ISOLATE a standalone bit Johannes Weiner
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=C4D87FA7-4B3D-440F-9E5F-B57561AB4FE8@nvidia.com \
--to=ziy@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
--cc=richardycc@google.com \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/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