Re: [PATCH v2 14/53] vircgroup: introduce virCgroupV2MakeGroup

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

 



On 10/05/2018 02:43 PM, Pavel Hrdina wrote:
> When creating cgroup hierarchy we need to enable controllers in the
> parent cgroup in order to be usable.  That means writing "+{controller}"
> into cgroup.subtree_control file.  We can enable only controllers that
> are enabled for parent cgroup, that means we need to do that for the
> whole cgroup tree.
> 
> Cgroups for threads needs to be handled differently in cgroup v2.  There
> are two types of controllers:
> 
>     - domain controllers: these cannot be enabled for threads
>     - threaded controllers: these can be enabled for threads
> 
> In addition there are multiple types of cgroups:
> 
>     - domain: normal cgroup
>     - domain threaded: a domain cgroup that serves as root for threaded
>                        cgroups
>     - domain invalid: invalid cgroup, can be changed into threaded, this
>                       is the default state if you create subgroup inside
>                       domain threaded group or threaded group
>     - threaded: threaded cgroup which can have domain threaded or
>                 threaded as parent group
> 
> In order to create threaded cgroup it's sufficient to write "threaded"
> into cgroup.type file, it will automatically make parent cgroup
> "domain threaded" if it was only "domain".  In case the parent cgroup
> is already "domain threaded" or "threaded" it will modify only the type
> of current cgroup.  After that we can enable threaded controllers.
> 
> Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
> ---
>  src/util/vircgroup.c        |  2 +-
>  src/util/vircgroupbackend.h |  1 +
>  src/util/vircgroupv2.c      | 76 +++++++++++++++++++++++++++++++++++++
>  3 files changed, 78 insertions(+), 1 deletion(-)

ACK

Michal

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



[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