[Devel] [PATCH vz10 14/32] mm/memcontrol: build memory.numa_migrate only with CONFIG_NUMA
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Aug 21 19:37:00 MSK 2026
From: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
memcg_numa_migrate_write() is defined inside the CONFIG_NUMA block of
memcontrol.c, but its cgroup-v2 cftype entry was added after the #endif,
so CONFIG_NUMA=n does not build:
mm/memcontrol.c: error: 'memcg_numa_migrate_write' undeclared here
(not in a function)
Move the entry inside the same CONFIG_NUMA block, next to memory.numa_stat.
A kernel built without NUMA has no nodes to migrate memory between, so
not offering the file is the right behaviour rather than a limitation.
Fixes: fe28fa7a0794 ("mm/memcontrol: add memory.numa_migrate to cgroup-v2")
Feature: mm: interface to migrate memory between NUMA nodes upon userspace request
https://virtuozzo.atlassian.net/browse/VSTOR-134732
Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 6301319529ee..4e0c0c46689a 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5258,12 +5258,12 @@ static struct cftype memory_files[] = {
.name = "numa_stat",
.seq_show = memory_numa_stat_show,
},
-#endif
{
.name = "numa_migrate",
.flags = CFTYPE_NOT_ON_ROOT,
.write = memcg_numa_migrate_write,
},
+#endif
{
.name = "oom.group",
.flags = CFTYPE_NOT_ON_ROOT | CFTYPE_NS_DELEGATABLE,
--
2.47.1
More information about the Devel
mailing list