From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>, linux-mm@kvack.org
Subject: [PATCH 2/3] migrate: Optimise alloc_migration_target()
Date: Thu, 6 Nov 2025 20:14:49 +0000 [thread overview]
Message-ID: <20251106201452.2292631-2-willy@infradead.org> (raw)
In-Reply-To: <20251106201452.2292631-1-willy@infradead.org>
Extract the zone number directly from the folio instead of using the
folio's zone number to look up the zone and asking the zone what its
number is.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
mm/migrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index c0e9f15be2a2..cc8d71bd116c 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2190,7 +2190,7 @@ struct folio *alloc_migration_target(struct folio *src, unsigned long private)
gfp_mask |= GFP_TRANSHUGE;
order = folio_order(src);
}
- zidx = zone_idx(folio_zone(src));
+ zidx = folio_zonenum(src);
if (is_highmem_idx(zidx) || zidx == ZONE_MOVABLE)
gfp_mask |= __GFP_HIGHMEM;
--
2.47.2
next prev parent reply other threads:[~2025-11-06 20:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 20:14 [PATCH 1/3] hugetlb: Optimise hugetlb_folio_init_tail_vmemmap() Matthew Wilcox (Oracle)
2025-11-06 20:14 ` Matthew Wilcox (Oracle) [this message]
2025-11-06 20:14 ` [PATCH 3/3] memory_hotplug: Optimise try_offline_memory_block() Matthew Wilcox (Oracle)
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=20251106201452.2292631-2-willy@infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.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