[systemd-devel] [PATCH] cgroup-util: Add more well-known controller names

Lennart Poettering lennart at poettering.net
Sun Nov 30 15:44:05 PST 2014


On Wed, 26.11.14 15:55, Martin Pitt (martin.pitt at ubuntu.com) wrote:

> Hello all,
> 
> some weeks ago I mentioned [1] that I'm working on making per-user
> (unprivileged) LXC containers work under systemd. Lennart made it
> quite clear [2] that he doesn't want to support this upstream until
> the kernel grows the necessary mechanisms; however, as this works and
> Ubuntu deems this feature important, I made a downstream patchset for
> it.
> 
> The first one is quite generic and might also be useful for other
> scenarios where admins configure/create cgroups locally: systemd
> currently only knows a handful of well-known cgroup controller names,
> but these days there are a lot more. This patch adds them, so that
> cg_create_everywhere() and friends work as intended.

Well, it's not really the "well-known" ones. It's the ones we actually
can make sense of, the ones where we expose properties on. It's also
the ones where we know that they will continue to exist in one way or
another in the future. We 

> +        "hugetlb\0"
> +        "cpuset\0"
> +        "net_cls\0"
> +        "net_prio\0"
> +        "freezer\0"
> +        "perf_event\0";

In general we should be really careful about manipulating hierarchies
we don't know enough about, since some controllers actually have an
effect on a process even with no actual cgroup property changed from
the default ("cpu" is an obvious one, which breaks RT scheduling). 

I figure before adding these controllers to the list systemd manages
we need to open the discussion with Tejun about the future of the
respective controllers...

I think it would be better to apply a patch of thee downstream if at
all, for now, if you need it now. 

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list