[libvirt PATCH 04/25] vircgroupv2: properly detect empty tasks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With cgroups v2 the file cgroup.procs will never be empty if threading
is enabled as it will always have ID of all processes even if all
threads of the processes are moved to sub-cgroups. If that happens the
file cgroup.threads will be empty.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/util/vircgroupv2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c
index 285b7675d9..65f5cc6bd0 100644
--- a/src/util/vircgroupv2.c
+++ b/src/util/vircgroupv2.c
@@ -521,7 +521,7 @@ virCgroupV2HasEmptyTasks(virCgroupPtr cgroup,
     int ret = -1;
     g_autofree char *content = NULL;
 
-    ret = virCgroupGetValueStr(cgroup, controller, "cgroup.procs", &content);
+    ret = virCgroupGetValueStr(cgroup, controller, "cgroup.threads", &content);
 
     if (ret == 0 && content[0] == '\0')
         ret = 1;
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux