[systemd-devel] [PATCH] test-cgroup-mask: pass on kernels without memory controller
lennart at poettering.net
Wed Feb 19 09:04:38 PST 2014
On Tue, 18.02.14 23:40, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:
> It seems that unit_get_siblings_mask returns the controllers
> filtered by what is available, but get_members_mask and
> get_cgroup_mask do not. This just fixes the test following the
> symptoms, since I don't know what is the expected behaviour.
Actually, that's not really the case...
unit_get_siblings_mask() will mask the controllers not by what is
available but actually masked by the CPU and BLKIO controller bits. This
is because propagation between siblings only needs to take place if
these controllers are used. And that's because only they have a "weight"
concept, i.e. where cgroups on the same level get a relative amount of
resources. THis is different for the "memory" controller which only
enforces absolute limits, and where it hence doesn't matter whether
all units on the same level also are in a cgroup or not.
The only call that actually masks against what really is available is
unit_get_target_mask(), which is never used for propagation but only for
actually realizing cgroups in the cgroup fs.
Lennart Poettering, Red Hat
More information about the systemd-devel