Bug 217838 - Systemd nowadays mounts Cgroups v2
Summary: Systemd nowadays mounts Cgroups v2
Status: NEW
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-28 11:35 UTC by Göran Uddeborg
Modified: 2023-12-30 10:01 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Göran Uddeborg 2023-08-28 11:35:46 UTC
There is a note in the cgroups.7 manual page saying that systemd automatically all the cgroups v1 controllers. This is no longer correct; at least on my Fedora system it mounts a cgroup2 hierarchy instead.
Comment 1 Rajesh 2023-12-27 08:03:59 UTC
Hi Göran,

Can you give us more info?

- How to replicate this?
- What version of Fedora are you using?

Rajesh
Comment 2 Rajesh 2023-12-27 09:05:32 UTC
Ok Göran,

I get what you mean but when I check man cgroups I find enough reference for v2. So what's the exact note you are referring to?
Comment 3 Göran Uddeborg 2023-12-29 21:09:18 UTC
You are correct that the text is often amended by saying systemd mounts the v2 hierarchy on modern systems. But there is one section saying

       Note that on many systems, the v1 controllers are automatically
       mounted under /sys/fs/cgroup; in particular, systemd(1)
       automatically creates such mounts.

In that place there is no mention that the comment only applies to older systems.

(FYI: When I wrote the bug I was running Fedora 38, and have since upgraded to Fedora 39. But you can see the problem also at https://www.man7.org/linux/man-pages/man7/cgroups.7.html I discovered the issue when translating the manual page to Swedish.)
Comment 4 Rajesh 2023-12-30 05:43:37 UTC
(In reply to Göran Uddeborg from comment #3)
> You are correct that the text is often amended by saying systemd mounts the
> v2 hierarchy on modern systems. But there is one section saying
> 
>        Note that on many systems, the v1 controllers are automatically
>        mounted under /sys/fs/cgroup; in particular, systemd(1)
>        automatically creates such mounts.
> 
> In that place there is no mention that the comment only applies to older
> systems.
> 
> (FYI: When I wrote the bug I was running Fedora 38, and have since upgraded
> to Fedora 39. But you can see the problem also at
> https://www.man7.org/linux/man-pages/man7/cgroups.7.html I discovered the
> issue when translating the manual page to Swedish.)

Got you. I also see the following mentioned under the section

"Cgroups v2 unified hierarchy"

"Note that on many modern systems, systemd(1) automatically mounts the cgroup2 filesystem at /sys/fs/cgroup/unified during the boot process."

May be reuse that and replace the one you have noted with the above? Does that work?
Comment 5 Göran Uddeborg 2023-12-30 10:01:32 UTC
Yes, that sounds like a good solution.

Note You need to log in before you can comment on or make changes to this bug.