[systemd-devel] Avoiding creating systemd memory and blkio controllers under /sys/fs/cgroup/memory and /sys/fs/cgroup/blkio.

Kevin Wilson wkevils at gmail.com
Fri Jan 15 12:17:08 PST 2016


Hi everyone,

I had a Fedora 20 Machine (x86_64) on which I installed the
latest 4.4 kernel released this week (I had built it from source). It
had systemd  208.

I wanted to test cgroup v2 (not in relation to systemd). In order to
be able to activate
cgoupv2 memory and cgroup controllers, the cgroup v1 controllers must
be disabled.

When I unmounted /sys/fs/cgroup/memory and /sys/fs/cgroup/blkio and mounted
cgroup v2 on /testv2, cat /testv2/cgroup.controllers showed
"memeory" and "io", and everything was fine.

Then I installed Fedora 22 on this machine, and it has systemd 219.
When I tried this
same sequence, of unmounting /sys/fs/cgroup/memory and /sys/fs/cgroup/blkio and
mounting cgroup v2 on /testv2, cat /testv2/cgroup.controllers showed nothing.

Trying to add disabling cgroup memory controller, by adding
cgroup_disable=memory,
to the kernel command line caused the system to hang in boot (which is
what I expected,
but tried anyway...)

Trying to solve the problem, I came to the conclusion that this is
probably because
there are processes in the memory and blkio groups which are held by
systemd in F22, and  which are not held in F20.

On the F22, when I look under /sys/fs/cgouop/memory, I see

/sys/fs/cgroup/memory/user.slice/
/sys/fs/cgroup/memory/user.slice/user-0.slice/
/sys/fs/cgroup/memory/user.slice/user-0.slice/session-10.scope
/sys/fs/cgroup/memory/user.slice/user-0.slice/session-2.scope
/sys/fs/cgroup/memory/user.slice/user-0.slice/session-9.scope
and more

And there are pids in many of the tasks entries under this directories.

And for the blkio:
 /sys/fs/cgroup/blkio/system.slice/
 /sys/fs/cgroup/blkio/user.slice/
 /sys/fs/cgroup/blkio/user.slice/user-0.slice/
 /sys/fs/cgroup/blkio/user.slice/user-0.slice/session-10.scope/
 /sys/fs/cgroup/blkio/user.slice/user-0.slice/session-2.scope/
/sys/fs/cgroup/blkio/user.slice/user-0.slice/session-9.scope/
and more.

And here again there are pids in many of the tasks entries under this
directories.

On the Fedora 20 machine, these entries do not exist, namely there are no
systemd entries under both  /sys/fs/cgroup/memory/ and
/sys/fs/cgroup/blkio.

Is there a way to disable creating these entries by systemd ?

Regards,
Kevin


More information about the systemd-devel mailing list