From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>,
Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 3/3] mm/memcontrol: memory.numa_migrate MAX_SCAN counts folios
Date: Wed, 28 Oct 2026 14:49:17 +0100 [thread overview]
Message-ID: <20261028-b4-prep-khorenko-vstor-152197-numa-migrate-cleanup-v1-3-aa959eecd3fd@virtuozzo.com> (raw)
In-Reply-To: <20261028-b4-prep-khorenko-vstor-152197-numa-migrate-cleanup-v1-0-aa959eecd3fd@virtuozzo.com>
memcg_numa_isolate_pages() counts a scanned folio as one whatever its
size, so the MAX_SCAN limit of memory.numa_migrate and the @nr_to_scan
arguments are in folios, not in pages as the comments say.
No functional change.
https://virtuozzo.atlassian.net/browse/VSTOR-152197
Feature: mm: interface to migrate memory between NUMA nodes upon userspace request
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
mm/memcontrol.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 4c3c06cfcf9fc..f93b0400c786d 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3499,8 +3499,8 @@ static struct folio *memcg_numa_migrate_new_folio(struct folio *old_folio,
}
/*
- * Isolate at most @nr_to_scan pages from @lruvec for further migration and
- * store them in @dst. Returns the number of pages scanned. Return value of 0
+ * Isolate at most @nr_to_scan folios from @lruvec for further migration and
+ * store them in @dst. Returns the number of folios scanned. Return value of 0
* means that @lruvec is empty.
*/
static long memcg_numa_isolate_pages(struct lruvec *lruvec,
@@ -3661,9 +3661,9 @@ static long __memcg_numa_migrate_pages(struct lruvec *lruvec, struct list_head *
}
/*
- * Migrate at most @nr_to_scan pages accounted to @memcg to @target_nodes.
- * Pages are spreaded evenly among destination nodes. If @nr_to_scan is <= 0,
- * then the function will attempt to migrate all pages accounted to @memcg.
+ * Scan at most @nr_to_scan folios accounted to @memcg and migrate them to
+ * @target_nodes, spread evenly among the nodes. If @nr_to_scan is <= 0, the
+ * function attempts to migrate all pages accounted to @memcg.
*/
static int memcg_numa_migrate_pages(struct mem_cgroup *memcg,
nodemask_t *target_nodes, long nr_to_scan)
@@ -3750,7 +3750,7 @@ static int memcg_numa_migrate_pages(struct mem_cgroup *memcg,
*
* where NODELIST is a comma-separated list of ranges N1-N2 specifying the set
* of nodes to migrate pages of this cgroup to, and the optional MAX_SCAN
- * imposes a limit on the number of pages that can be migrated in one go.
+ * imposes a limit on the number of folios scanned in one go.
*
* The call may be interrupted by a signal, in which case -EINTR is returned.
*/
--
2.43.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
prev parent reply other threads:[~2026-10-28 13:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 13:49 [Devel] [PATCH hci-8.1 0/3] mm/memcontrol: tidy up the memory.numa_migrate code Konstantin Khorenko
2026-10-28 13:49 ` [Devel] [PATCH hci-8.1 1/3] mm/memcontrol: drop the unused update_lru_sizes() Konstantin Khorenko
2026-10-28 13:49 ` [Devel] [PATCH hci-8.1 2/3] mm/memcontrol: say where the numa_migrate code comes from Konstantin Khorenko
2026-10-28 13:49 ` Konstantin Khorenko [this message]
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=20261028-b4-prep-khorenko-vstor-152197-numa-migrate-cleanup-v1-3-aa959eecd3fd@virtuozzo.com \
--to=khorenko@virtuozzo.com \
--cc=devel@openvz.org \
--cc=ptikhomirov@virtuozzo.com \
--cc=vasileios.almpanis@virtuozzo.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.