[systemd-devel] regarding to cgroup siblings mask

Lennart Poettering lennart at poettering.net
Wed Apr 8 09:48:20 PDT 2015


On Tue, 24.03.15 20:29, WaLyong Cho (walyong.cho at samsung.com) wrote:

> Hi,
> 
> 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.

> In our system, some of service have MemoryLimit= options. By this
> options, all of other services also create its own cgroup in memory. In
> mobile system(or some of other embedded system), this can be heavy load.
> 
> If this can be configurable, how about add a configuration for cgroup
> mask propagation to siblings?

The option for this will go away in the kernel too eventually, and we
shouldn't intrdouce an option for behaviour we already know now we
cannot support for long.

I hope this makes some sense,

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list