]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vircgroup: introduce virCgroupV2AddTask
authorPavel Hrdina <phrdina@redhat.com>
Fri, 17 Aug 2018 14:49:33 +0000 (16:49 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 5 Oct 2018 13:53:29 +0000 (15:53 +0200)
commit48572f8825f2bbd7dabb5afb34efbf7afa2f7302
treec5937b724f0ec61a1b8be38ce1bdb36ea638e3fc
parent4fe4847438c8ff042d6d39718b26023199e67c8a
vircgroup: introduce virCgroupV2AddTask

In cgroups v2 we need to handle threads and processes differently.
If you need to move a process you need to write its pid into
cgrou.procs file and it will move the process with all its threads
as well.  The whole process will be moved if you use tid of any thread.

In order to move only threads at first we need to create threaded group
and after that we can write the relevant thread tids into cgroup.threads
file.  Threads can be moved only into cgroups that are children of
cgroup of its process.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/util/vircgroupv2.c