Bug 60795

Summary: Unable to mount cgroups controller
Product: Process Management Reporter: Maciej Galkiewicz (maciej)
Component: OtherAssignee: process_other
Status: REOPENED ---    
Severity: normal CC: alan, marc
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.10.3 Subsystem:
Regression: No Bisected commit-id:

Description Maciej Galkiewicz 2013-08-26 15:36:53 UTC
Does not work:

root@n1cc[staging]:/sys/fs# mount -t tmpfs tmpfs cgroup/
root@n1cc[staging]:/sys/fs# cd cgroup/
root@n1cc[staging]:/sys/fs/cgroup# l
total 0
root@n1cc[staging]:/sys/fs/cgroup# mkdir cpuset
root@n1cc[staging]:/sys/fs/cgroup# mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset
mount: cpuset already mounted or /sys/fs/cgroup/cpuset busy
root@n1cc[staging]:/sys/fs/cgroup# uname -a
Linux n1cc 3.10-1-amd64 #1 SMP Debian 3.10.3-1 (2013-07-27) x86_64 GNU/Linux

Of course cpuset is not already mounted.

Works:

root@n1cc[staging]:/sys/fs# mount -t tmpfs tmpfs cgroup/
root@n1cc[staging]:/sys/fs# cd cgroup/
root@n1cc[staging]:/sys/fs/cgroup# mkdir cpuset
root@n1cc[staging]:/sys/fs/cgroup# mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset

root@n1cc[staging]:/sys/fs/cgroup# uname -a
Linux n1cc 3.9-1-amd64 #1 SMP Debian 3.9.8-1 x86_64 GNU/Linux

Mounting cgroups using default options works on both kernels.
Comment 1 Maciej Galkiewicz 2013-10-01 13:04:56 UTC
Works with 3.10.11. I am not sure but it probably started to work after reboot. I was trying to mount cpuset after umounting all cgroups mounted with command:
# mount -t cgroup cgroup /sys/fs/cgroup
Comment 2 Marc MERLIN 2015-04-13 03:56:07 UTC
I had the same problem with kernel 3.19.3.
If you mount cgroup in /sys/fs/cgroup, it's over.
You can unmount it but you'll never be able to mount the cgroup subdirs under a newly created tmpfs, you get 'already mounted or busy'
/proc/mounts shows cgroups is not mounted anywhere, if I reboot, everything works.