From: Zi Yan <ziy@nvidia.com>
To: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Vlastimil Babka <vbabka@suse.cz>,
linux-mm@kvack.org
Cc: Oscar Salvador <osalvador@suse.de>,
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 v8 3/6] mm/page_alloc: add support for initializing pageblock as isolated.
Date: Mon, 02 Jun 2025 21:56:04 -0400 [thread overview]
Message-ID: <56683268-92C8-4FAE-9BAF-645C35227F24@nvidia.com> (raw)
In-Reply-To: <20250602235247.1219983-4-ziy@nvidia.com>
On 2 Jun 2025, at 19:52, Zi Yan wrote:
> MIGRATE_ISOLATE is a standalone bit, so a pageblock cannot be initialized
> to just MIGRATE_ISOLATE. Add init_pageblock_migratetype() to enable
> initialize a pageblock with a migratetype and isolated.
>
> Signed-off-by: Zi Yan <ziy@nvidia.com>
> Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
> Acked-by: David Hildenbrand <david@redhat.com>
> ---
> include/linux/memory_hotplug.h | 3 ++-
> include/linux/page-isolation.h | 3 +++
> mm/hugetlb.c | 4 ++--
> mm/internal.h | 3 ++-
> mm/memory_hotplug.c | 12 ++++++++----
> mm/memremap.c | 2 +-
> mm/mm_init.c | 24 +++++++++++++++---------
> mm/page_alloc.c | 24 ++++++++++++++++++++++++
> 8 files changed, 57 insertions(+), 18 deletions(-)
From 0e48cfc8fc9e10c1d2fe9bc080af737b4f852347 Mon Sep 17 00:00:00 2001
From: Zi Yan <ziy@nvidia.com>
Date: Mon, 2 Jun 2025 21:51:25 -0400
Subject: [PATCH] fixup: make init_pageblock_migratetype() set right
migratetype.
when page_group_by_mobility_disabled is 1.
Signed-off-by: Zi Yan <ziy@nvidia.com>
---
mm/page_alloc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 0867e2b2e187..ff098523a501 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -552,12 +552,14 @@ void __meminit init_pageblock_migratetype(struct page *page,
enum migratetype migratetype,
bool isolate)
{
- unsigned long flags = migratetype;
+ unsigned long flags;
if (unlikely(page_group_by_mobility_disabled &&
migratetype < MIGRATE_PCPTYPES))
migratetype = MIGRATE_UNMOVABLE;
+ flags = migratetype;
+
#ifdef CONFIG_MEMORY_ISOLATION
if (migratetype == MIGRATE_ISOLATE) {
VM_WARN_ONCE(
--
2.47.2
Best Regards,
Yan, Zi
next prev parent reply other threads:[~2025-06-03 1:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-02 23:52 [PATCH v8 0/6] Make MIGRATE_ISOLATE a standalone bit Zi Yan
2025-06-02 23:52 ` [PATCH v8 1/6] mm/page_alloc: pageblock flags functions clean up Zi Yan
2025-06-02 23:52 ` [PATCH v8 2/6] mm/page_isolation: make page isolation a standalone bit Zi Yan
2025-06-02 23:52 ` [PATCH v8 3/6] mm/page_alloc: add support for initializing pageblock as isolated Zi Yan
2025-06-03 1:56 ` Zi Yan [this message]
2025-06-02 23:52 ` [PATCH v8 4/6] mm/page_isolation: remove migratetype from move_freepages_block_isolate() Zi Yan
2025-06-02 23:52 ` [PATCH v8 5/6] mm/page_isolation: remove migratetype from undo_isolate_page_range() Zi Yan
2025-06-02 23:52 ` [PATCH v8 6/6] mm/page_isolation: remove migratetype parameter from more functions Zi Yan
2025-06-03 21:27 ` 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=56683268-92C8-4FAE-9BAF-645C35227F24@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
all inboxes | Powered by JetHome®