[systemd-devel] regarding to cgroup siblings mask

Lennart Poettering lennart at poettering.net
Thu Apr 9 01:02:34 PDT 2015


On Thu, 09.04.15 14:10, WaLyong Cho (walyong.cho at samsung.com) wrote:

> >> In recent systemd(from some month ago), when a unit has a mask for cpu
> >> or blockio or memory, this mask is also propagated to siblings by
> >> unit_get_target_mask().
> >> According to some of comments, it seems intentional.
> >>
> >> Could anyone explain why?
> > 
> > I added this after talking to Tejun. It's basically what the kernel
> > will effectively do in "sane behaviour" mode too.
> > 
> > Basically, the kernel really wants to avoid having to compare
> > individual processes against groups, because behaviour is unclear
> > then. They want to comapre groups against groups and processes against
> > processes, but not groups against processes, since in many cases
> > behaviour is very unclear then. To avoid the ambighities this creates
> > entirely the answer is to not allow this, and hence always propagate
> > all controller memberships not only towards the root, but also sideways.
> 
> OK, understood but I'm not sure the compare group properties came under
> for all of cgroup subsystem. In case of CPUShares=, BlockIOWeight= such
> like take weight as value, should be. But in case of CPUQuota=,
> MemoryLimit=, it just a problems of own. Those are not racing with other
> groups. So for this kind of properties do not need to be propagated to
> siblings.
> 
> I'm not sure this make sense. But if yes, below patch will only
> propagate proportional or relative properties.
> http://lists.freedesktop.org/archives/systemd-devel/2015-March/029885.html

Well, it's a matter of clean design really. Sure, if a controller
doesn't have proportional props it's not that important, but it is a
much simpler design to disallow processes and cgroups on the same
level in the tree, and it's going to be what the "sane behaviour"
cgroup rework of the kernel does...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list