[Devel] Re: [PATCH] cgroupfs: create /sys/fs/cgroup to mount cgroupfs on

Greg KH gregkh at suse.de
Thu Jul 22 14:18:56 PDT 2010


On Thu, Jul 22, 2010 at 03:37:41PM -0400, Vivek Goyal wrote:
> On Thu, Jul 22, 2010 at 11:36:15AM -0700, Greg KH wrote:
> > On Thu, Jul 22, 2010 at 11:31:07AM -0700, Paul Menage wrote:
> > > On Thu, Jul 22, 2010 at 11:26 AM, Greg KH <gregkh at suse.de> wrote:
> > > > We really shouldn't be asking userspace to create new root filesystems.
> > > > So follow along with all of the other in-kernel filesystems, and provide
> > > > a mount point in sysfs.
> > > >
> > > > For cgroupfs, this should be in /sys/fs/cgroup/  This change provides
> > > > that mount point when the cgroup filesystem is registered in the kernel.
> > > 
> > > But cgroups will typically have multiple mounts, with different
> > > resource controllers/options on each mount. That doesn't really fit in
> > > with this scheme.
> > 
> > Really?  I see systems mounting it at /cgroups/ in the filesystem today.
> > Where are you expecting it to be mounted at?
> > 
> 
> Greg,
> 
> [CCing few more folks who might be interested in this dicussion ]
> 
> We do want to retain facility to mount different controllers at different
> mount points. We were discussing the other day that in libvirt we might
> want to mount block IO controller and network controller separately as
> by default we will not put a new virtual machine in a cgroup of its own
> because of the penatly involved.

That's fine, I'm not changing that ability at all.  We just need a
"default" mount point for "normal" users.

> For other controllers like cpu, memory etc, libvirt automatically puts
> each new virtual machine in a cgroup of own. So this is one use case
> where we might want to mount different controllers at different mount
> points.
> 
> For my testing I now always use /cgroup/ and create directories under it
> /cgroup/blkio /cgroup/cpu etc and mount controllers on respective
> directories.

Lennart and Kay, is this what systemd is doing?  I really don't think we
should be adding a root /cgroup/ mount point to the system for something
like this.

Maybe /dev/cgroup/ is better to use, as that way users can create
sub-mount points easier.  They can't do that in /sys/fs/cgroup/

thanks,

greg k-h
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list