[libvirt] [PATCH 3/5] util: vircgroupv2: use any controller to create thread directory

Pavel Hrdina posted 5 patches 6 years, 7 months ago
There is a newer version of this series
[libvirt] [PATCH 3/5] util: vircgroupv2: use any controller to create thread directory
Posted by Pavel Hrdina 6 years, 7 months ago
The assumption that CPU controller would be always enabled is wrong, we
should use any available controller to create a new sub-cgroup.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
 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 186c4fc76b..f3a119b689 100644
--- a/src/util/vircgroupv2.c
+++ b/src/util/vircgroupv2.c
@@ -399,7 +399,7 @@ virCgroupV2MakeGroup(virCgroupPtr parent ATTRIBUTE_UNUSED,
 
     if (create) {
         if (flags & VIR_CGROUP_THREAD) {
-            if (virCgroupSetValueStr(group, VIR_CGROUP_CONTROLLER_CPU,
+            if (virCgroupSetValueStr(group, controller,
                                      "cgroup.type", "threaded") < 0) {
                 return -1;
             }
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/5] util: vircgroupv2: use any controller to create thread directory
Posted by Ján Tomko 6 years, 7 months ago
On Thu, Jun 20, 2019 at 01:25:43PM +0200, Pavel Hrdina wrote:
>The assumption that CPU controller would be always enabled is wrong, we
>should use any available controller to create a new sub-cgroup.
>
>Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
>---
> src/util/vircgroupv2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list