Re: [PATCH 2/2] cgroup, docs: Document interaction of RT processes with cpu controller
From: Shashank.Mahadasyam@xxxxxxxx
Date: Fri Mar 28 2025 - 06:45:49 EST
Hi Michal,
Apologies for the delay :)
> On Thu, Mar 06, 2025 at 11:02:22AM +0000, "Shashank.Mahadasyam@xxxxxxxx" <Shashank.Mahadasyam@xxxxxxxx> wrote:
> > Do you think it should be rephrased to make it clearer?
>
> Aha, I understand now why it confused you (with the paragraph about
> realtime tasks right above interface files).
>
> I'd consider such a minimal correction:
>
> --- a/Documentation/admin-guide/cgroup-v2.rst
> +++ b/Documentation/admin-guide/cgroup-v2.rst
> @@ -1076,7 +1076,7 @@ cpufreq governor about the minimum desired frequency which should always be
> provided by a CPU, as well as the maximum desired frequency, which should not
> be exceeded by a CPU.
>
> -WARNING: cgroup2 doesn't yet support control of realtime processes. For
> +WARNING: cgroup2 doesn't yet support (bandwidth) control of realtime processes. For
> a kernel built with the CONFIG_RT_GROUP_SCHED option enabled for group
> scheduling of realtime processes, the cpu controller can only be enabled
> when all RT processes are in the root cgroup. This limitation does
I'll incorporate this in v2. Thanks!
> Of course wordier rewrite is possible but I find the text as you
> originally proposed unclear due to several uses of "only" that imply
> restrictions that aren't in place in reality.
Given the different scheduling classes (fair, ext, rt, deadline), it would be nice
to document which cpu interface files are related to which scheduling classes.
Like, cpu.idle applies to only the fair class, cpu.weight applies to the fair class,
as well as ext, if configured so, cpu.stat accounts for all classes
(I'm not sure about this, I haven't tested this yet), etc.
The proposed patch is in this direction, but just for the rt class. Any suggestions
on how this intent can be made clearer? How about something like this:
CPU Interface Files
~~~~~~~~~~~~~~~~~~~
All time durations are in microseconds. The scheduling classes mentioned beside
the interface files are the only classes they are related to.
cpu.stat (fair, ext, rt, deadline)
...
cpu.weight (fair, ext)
...
cpu.weight.nice (fair, ext)
...
cpu.max (fair)
...
cpu.max.burst (fair)
...
cpu.pressure (fair, ext, rt, deadline)
...
cpu.uclamp.min (fair, rt)
...
cpu.uclamp.max (fair, rt)
...
cpu.idle (fair)
Thanks,
Shashank