A CT is meant to see a kernel without NUMA support, so the NUMA API syscalls return -ENOSYS in a non-super VE. The tmpfs mpol= mount option still lets a CT set a NUMA memory policy for all files of a tmpfs mount.
Reject mpol= in a non-super VE the way a kernel built without CONFIG_NUMA does: the mount fails with -EINVAL and "Unsupported parameter 'mpol'". https://virtuozzo.atlassian.net/browse/VSTOR-153679 Feature: mm: prohibit NUMA API inside CT Signed-off-by: Konstantin Khorenko <[email protected]> --- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index f8cea7e5de88d..8862723003fb0 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -4378,7 +4378,7 @@ static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param) ctx->seen |= SHMEM_SEEN_HUGE; break; case Opt_mpol: - if (IS_ENABLED(CONFIG_NUMA)) { + if (IS_ENABLED(CONFIG_NUMA) && ve_is_super(get_exec_env())) { mpol_put(ctx->mpol); ctx->mpol = NULL; if (mpol_parse_str(param->string, &ctx->mpol)) -- 2.43.0 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
