OSDN Git Service

Merge tag 'timers-urgent-2023-09-02' of git://git.kernel.org/pub/scm/linux/kernel...
[tomoyo/tomoyo-test1.git] / mm / vmpressure.c
index b526447..22c6689 100644 (file)
@@ -244,6 +244,14 @@ void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool tree,
        if (mem_cgroup_disabled())
                return;
 
+       /*
+        * The in-kernel users only care about the reclaim efficiency
+        * for this @memcg rather than the whole subtree, and there
+        * isn't and won't be any in-kernel user in a legacy cgroup.
+        */
+       if (!cgroup_subsys_on_dfl(memory_cgrp_subsys) && !tree)
+               return;
+
        vmpr = memcg_to_vmpressure(memcg);
 
        /*