systemd and cgroups: heads up

Lennart Poettering mzerqung at 0pointer.de
Thu Aug 26 21:36:41 UTC 2010


On Thu, 26.08.10 23:30, Lennart Poettering (mzerqung at 0pointer.de) wrote:

> 
> On Thu, 26.08.10 17:03, Matthew Miller (mattdm at mattdm.org) wrote:
> 
> > On Thu, Aug 26, 2010 at 10:19:44PM +0200, Lennart Poettering wrote:
> > > 2) systemd mounts all hierarchies exposed by the kernel by default. The
> > >    scheme how it does that follows the default configuration libcgroup
> > >    installs (modulo the recent /sys/fs/cgroup root dir change). We mount
> > 
> > Would it be possible to have systemd either use libcgroup to mount these
> > directories, or to parse the libcgroup config file to determine where to put
> > the mounts?
> 
> libcgroup doesn't really have an API for mounting things.
> 
> Note however, that when libcgroup initializes it figures out where the
> hierarchies are mounted based on the mount info exported by the kernel,
> so regardless who mounted the hiearchies and where they are mounted
> libcgroup actually does the right thing.

And one more thing: the kernel actually allows mounting of hierarchies
to multiple places. That means even if systemd mounts a controller to
/sys/fs/cgroup/foo the user may still choose to mount it to
/cgroup/bar and the tree will be visible at both places.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the devel mailing list