From: Zi Yan <ziy@nvidia.com>
To: David Hildenbrand <david@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>, <linux-mm@kvack.org>
Cc: Andrew Morton <akpm@linux-foundation.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 v5 6/6] mm/page_isolation: remove migratetype parameter from more functions.
Date: Sun, 25 May 2025 21:33:59 -0400 [thread overview]
Message-ID: <B94EE1C1-ED99-4A11-AC6D-9342C89AB450@nvidia.com> (raw)
In-Reply-To: <20250523191258.339826-7-ziy@nvidia.com>
On 23 May 2025, at 15:12, 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 provide the information. At the
> same time change isolation flags to enum pb_isolate_mode (MEMORY_OFFLINE,
> CMA_ALLOCATION, and ISOLATE_MODE_OTHERS). Remove REPORT_FAILURE and check
> MEMORY_OFFLINE instead, since only MEMORY_OFFLINE reports isolation
> failures.
>
> 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 | 19 ++++++++--
> include/trace/events/kmem.h | 14 ++++---
> mm/cma.c | 2 +-
> mm/memory_hotplug.c | 4 +-
> mm/page_alloc.c | 25 ++++++-------
> mm/page_isolation.c | 67 +++++++++++++++-------------------
> 8 files changed, 72 insertions(+), 68 deletions(-)
This fixes mode's wrong type.
From 0c9792cd7ad1d1cd16b276b70d972e5b871ff653 Mon Sep 17 00:00:00 2001
From: Zi Yan <ziy@nvidia.com>
Date: Sun, 25 May 2025 21:29:06 -0400
Subject: [PATCH] fix mode's type.
Signed-off-by: Zi Yan <ziy@nvidia.com>
---
mm/page_alloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 48f458f7143a..3096304d1b58 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6901,8 +6901,8 @@ int alloc_contig_range_noprof(unsigned long start, unsigned long end,
};
INIT_LIST_HEAD(&cc.migratepages);
bool is_range_aligned;
- isolate_mode_t mode = (alloc_flags & ACR_CMA) ? CMA_ALLOCATION :
- ISOLATE_MODE_OTHERS;
+ enum pb_isolate_mode mode =
+ (alloc_flags & ACR_CMA) ? CMA_ALLOCATION : ISOLATE_MODE_OTHERS;
gfp_mask = current_gfp_context(gfp_mask);
if (__alloc_contig_verify_gfp_mask(gfp_mask, (gfp_t *)&cc.gfp_mask))
--
2.47.2
--
Best Regards,
Yan, Zi
next prev parent reply other threads:[~2025-05-26 1:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 19:12 [PATCH v5 0/6] Make MIGRATE_ISOLATE a standalone bit Zi Yan
2025-05-23 19:12 ` [PATCH v5 1/6] mm/page_alloc: pageblock flags functions clean up Zi Yan
2025-05-27 9:46 ` Vlastimil Babka
2025-05-27 14:47 ` Zi Yan
2025-05-23 19:12 ` [PATCH v5 2/6] mm/page_isolation: make page isolation a standalone bit Zi Yan
2025-05-27 10:11 ` Vlastimil Babka
2025-05-27 14:56 ` Zi Yan
2025-05-23 19:12 ` [PATCH v5 3/6] mm/page_alloc: add support for initializing pageblock as isolated Zi Yan
2025-05-27 10:31 ` Vlastimil Babka
2025-05-23 19:12 ` [PATCH v5 4/6] mm/page_isolation: remove migratetype from move_freepages_block_isolate() Zi Yan
2025-05-27 10:50 ` Vlastimil Babka
2025-05-27 15:02 ` Zi Yan
2025-05-23 19:12 ` [PATCH v5 5/6] mm/page_isolation: remove migratetype from undo_isolate_page_range() Zi Yan
2025-05-27 10:56 ` Vlastimil Babka
2025-05-23 19:12 ` [PATCH v5 6/6] mm/page_isolation: remove migratetype parameter from more functions Zi Yan
2025-05-26 1:33 ` Zi Yan [this message]
2025-05-27 12:55 ` Vlastimil Babka
2025-05-27 15:04 ` Zi Yan
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=B94EE1C1-ED99-4A11-AC6D-9342C89AB450@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®