From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Khorenko Date: Fri, 21 Aug 2026 18:42:16 +0200 Subject: [Devel] [PATCH RHEL10 COMMIT] mm/memcontrol: build memory.numa_migrate only with CONFIG_NUMA In-Reply-To: <20260821163718.187766-15-khorenko@virtuozzo.com> Message-ID: <202608211642.67LGgGNp667400@f0.sw.ru> List-Id: The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git after rh10-6.12.0-211.39.1.16.6.vz10 ------> commit e597ec2243c20e0f134c7d873fd8d0785e921c1c Author: Eva Kurchatova Date: Fri Aug 21 18:37:00 2026 +0200 mm/memcontrol: build memory.numa_migrate only with CONFIG_NUMA 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 Signed-off-by: Konstantin Khorenko --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 6301319529ee0..4e0c0c46689aa 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,