[PATCH 0/2] cgroup, docs: Clarify interaction of RT processes with cgroup v2 cpu controller

From: Shashank Balaji via B4 Relay
Date: Tue Mar 04 2025 - 23:13:25 EST


Currently, CONFIG_RT_GROUP_SCHED is practically unusable. If enabled,
the cpu controller can be enabled only when all the realtime processes are in
the root cgroup. This has been clarified by Waiman Long in commit
20d4628 (cgroup, docs: Clarify limitation of RT processes with cgroup v2
cpu controller): https://lore.kernel.org/lkml/20240320142302.1790171-1-longman@xxxxxxxxxx/

But this limitation does not affect any of the other controllers:
irrespective of CONFIG_RT_GROUP_SCHED, the other controllers can be used
for the resource control of realtime processes. This is made more
explicit in the first patch.

Even when CONFIG_RT_GROUP_SCHED is disabled, the runtime of realtime
processes is accounted for by cpu.pressure, and the usage_usec, user_usec,
and system_usec fields of cpu.stat, and cpu.uclamp.{min, max} affect
realtime processes as well. This is documented in the second patch.

Signed-off-by: Shashank Balaji <shashank.mahadasyam@xxxxxxxx>
---
Shashank Balaji (2):
cgroup, docs: Be explicit about independence of RT_GROUP_SCHED and non-cpu controllers
cgroup, docs: Document interaction of RT processes with cpu controller

Documentation/admin-guide/cgroup-v2.rst | 41 ++++++++++++++++++++++-----------
1 file changed, 27 insertions(+), 14 deletions(-)
---
base-commit: 9b381a28f44a49b92b03bb3982728f9cb67ee225
change-id: 20250226-rt-and-cpu-controller-doc-8a8aac572f3e

Best regards,
--
Shashank Balaji <shashank.mahadasyam@xxxxxxxx>