newbie-level question about cgroups

Robert P. J. Day rpjday at crashcourse.ca
Mon Jul 29 11:00:20 EDT 2019


On Sun, 28 Jul 2019, Valdis Klētnieks wrote:

> On Sun, 28 Jul 2019 15:39:26 -0400, "Robert P. J. Day" said:
>
> >   no point bugging the actual cgroup people about this since it
> > should be simple ... if i need *only* cgroup v2, can i dispense
> > entirely with everything under /sys/fs/cgroup/ other than
> > /sys/fs/cgroup/unified?
>
> There's a whole mess of CONFIG_CGROUP_* variables, feel free to turn
> off those that your system doesn't actually need.
>
> Make sure that you keep a backup kernel in case you turn off
> something you shouldn't have.  In particular, systemd seems to want
> all sorts of cgroups for no reason other than "because they're
> there".

  actually, i just ran across the "cgroup_no_v1=" boot-time parameter:

    [KNL] Disable cgroup controllers and named hierarchies in v1
    Format: { { controller | "all" | "named" }
              [,{ controller | "all" | "named" }...] }
    Like cgroup_disable, but only applies to cgroup v1;
    the blacklisted controllers remain available in cgroup2.
    "all" blacklists all controllers and "named" disables
    named mounts. Specifying both "all" and "named" disables
    all v1 hierarchies.

so i guess it's not only possible, it's easy. :-)

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                         http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


More information about the Kernelnewbies mailing list