The commit is pushed to "branch-rh10-6.12.0-55.13.1.2.x.vz10-ovz" and will
appear at [email protected]:openvz/vzkernel.git
after rh10-6.12.0-55.13.1.2.10.vz10
------>
commit 04c6f8114c89d55934e48e1bc6934e22a16b77dd
Author: Pavel Tikhomirov <[email protected]>
Date: Mon Oct 6 12:45:59 2025 +0800
mm/memcontrol: use cgroup_subsys_on_dfl to detect cgroup-v2
This helper uses static key and is claimed "fast" test for default
hierarchy, so let's use it everywhere.
Fixes: 16086c4ea5a33 ("mm/memcontrol: fix mem_cgroup_enough_memory on
cgroup-v2")
https://virtuozzo.atlassian.net/browse/VSTOR-105819
Signed-off-by: Pavel Tikhomirov <[email protected]>
Feature: mm: per-CT memory overcommit heuristic
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 326f92657c2d3..cba985e5d3d1d 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3391,7 +3391,7 @@ static int mem_cgroup_enough_memory(struct mem_cgroup
*memcg, long pages)
long free;
/* unused memory */
- if (memcg->css.cgroup->root == &cgrp_dfl_root) {
+ if (cgroup_subsys_on_dfl(memory_cgrp_subsys)) {
free = memcg->memory.max - page_counter_read(&memcg->memory);
free += memcg->swap.max - page_counter_read(&memcg->swap);
} else {
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel