[PATCH 1/2] cgroup, docs: Be explicit about independence of RT_GROUP_SCHED and non-cpu controllers

Shashank Balaji via B4 Relay posted 2 patches 9 months, 2 weeks ago
[PATCH 1/2] cgroup, docs: Be explicit about independence of RT_GROUP_SCHED and non-cpu controllers
Posted by Shashank Balaji via B4 Relay 9 months, 2 weeks ago
From: Shashank Balaji <shashank.mahadasyam@sony.com>

The cgroup v2 cpu controller has a limitation that if
CONFIG_RT_GROUP_SCHED is enabled, the cpu controller can be enabled only
if all the realtime processes are in the root cgroup. The other
controllers have no such restriction. They can be used for the resource
control of realtime processes irrespective of whether
CONFIG_RT_GROUP_SCHED is enabled or not.

Signed-off-by: Shashank Balaji <shashank.mahadasyam@sony.com>
---
 Documentation/admin-guide/cgroup-v2.rst | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index cb1b4e759b7e267c24d7f4f69564c16fb29c4d89..f293a13b42ed69e7c6bf5e974cb86e228411af4e 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1076,15 +1076,20 @@ 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
-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
-not apply if CONFIG_RT_GROUP_SCHED is disabled.  Be aware that system
-management software may already have placed RT processes into nonroot
-cgroups during the system boot process, and these processes may need
-to be moved to the root cgroup before the cpu controller can be enabled
-with a CONFIG_RT_GROUP_SCHED enabled kernel.
+WARNING: cgroup2 cpu controller doesn't yet fully support the 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. Be aware that system
+management software may already have placed RT processes into non-root cgroups
+during the system boot process, and these processes may need to be moved to the
+root cgroup before the cpu controller can be enabled with a
+CONFIG_RT_GROUP_SCHED enabled kernel.
+
+With CONFIG_RT_GROUP_SCHED disabled, this limitation does not apply and some of
+the interface files either affect realtime processes or account for them. See
+the following section for details. Only the cpu controller is affected by
+CONFIG_RT_GROUP_SCHED. Other controllers can be used for the resource control of
+realtime processes irrespective of CONFIG_RT_GROUP_SCHED.
 
 
 CPU Interface Files

-- 
2.43.0
Re: [PATCH 1/2] cgroup, docs: Be explicit about independence of RT_GROUP_SCHED and non-cpu controllers
Posted by Tejun Heo 9 months, 2 weeks ago
On Wed, Mar 05, 2025 at 01:12:43PM +0900, Shashank Balaji via B4 Relay wrote:
> From: Shashank Balaji <shashank.mahadasyam@sony.com>
> 
> The cgroup v2 cpu controller has a limitation that if
> CONFIG_RT_GROUP_SCHED is enabled, the cpu controller can be enabled only
> if all the realtime processes are in the root cgroup. The other
> controllers have no such restriction. They can be used for the resource
> control of realtime processes irrespective of whether
> CONFIG_RT_GROUP_SCHED is enabled or not.
> 
> Signed-off-by: Shashank Balaji <shashank.mahadasyam@sony.com>

Applied to cgroup/for-6.15.

Thanks.

-- 
tejun
Re: [PATCH 1/2] cgroup, docs: Be explicit about independence of RT_GROUP_SCHED and non-cpu controllers
Posted by Michal Koutný 9 months, 2 weeks ago
On Wed, Mar 05, 2025 at 01:12:43PM +0900, Shashank Balaji via B4 Relay <devnull+shashank.mahadasyam.sony.com@kernel.org> wrote:
> From: Shashank Balaji <shashank.mahadasyam@sony.com>
> 
> The cgroup v2 cpu controller has a limitation that if
> CONFIG_RT_GROUP_SCHED is enabled, the cpu controller can be enabled only
> if all the realtime processes are in the root cgroup. The other
> controllers have no such restriction. They can be used for the resource
> control of realtime processes irrespective of whether
> CONFIG_RT_GROUP_SCHED is enabled or not.
> 
> Signed-off-by: Shashank Balaji <shashank.mahadasyam@sony.com>
> ---
>  Documentation/admin-guide/cgroup-v2.rst | 23 ++++++++++++++---------
>  1 file changed, 14 insertions(+), 9 deletions(-)
> 

Acked-by: Michal Koutný <mkoutny@suse.com>
Re: [PATCH 1/2] cgroup, docs: Be explicit about independence of RT_GROUP_SCHED and non-cpu controllers
Posted by Waiman Long 9 months, 2 weeks ago
On 3/4/25 11:12 PM, Shashank Balaji via B4 Relay wrote:
> From: Shashank Balaji <shashank.mahadasyam@sony.com>
>
> The cgroup v2 cpu controller has a limitation that if
> CONFIG_RT_GROUP_SCHED is enabled, the cpu controller can be enabled only
> if all the realtime processes are in the root cgroup. The other
> controllers have no such restriction. They can be used for the resource
> control of realtime processes irrespective of whether
> CONFIG_RT_GROUP_SCHED is enabled or not.
>
> Signed-off-by: Shashank Balaji <shashank.mahadasyam@sony.com>
> ---
>   Documentation/admin-guide/cgroup-v2.rst | 23 ++++++++++++++---------
>   1 file changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
> index cb1b4e759b7e267c24d7f4f69564c16fb29c4d89..f293a13b42ed69e7c6bf5e974cb86e228411af4e 100644
> --- a/Documentation/admin-guide/cgroup-v2.rst
> +++ b/Documentation/admin-guide/cgroup-v2.rst
> @@ -1076,15 +1076,20 @@ 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
> -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
> -not apply if CONFIG_RT_GROUP_SCHED is disabled.  Be aware that system
> -management software may already have placed RT processes into nonroot
> -cgroups during the system boot process, and these processes may need
> -to be moved to the root cgroup before the cpu controller can be enabled
> -with a CONFIG_RT_GROUP_SCHED enabled kernel.
> +WARNING: cgroup2 cpu controller doesn't yet fully support the 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. Be aware that system
> +management software may already have placed RT processes into non-root cgroups
> +during the system boot process, and these processes may need to be moved to the
> +root cgroup before the cpu controller can be enabled with a
> +CONFIG_RT_GROUP_SCHED enabled kernel.
> +
> +With CONFIG_RT_GROUP_SCHED disabled, this limitation does not apply and some of
> +the interface files either affect realtime processes or account for them. See
> +the following section for details. Only the cpu controller is affected by
> +CONFIG_RT_GROUP_SCHED. Other controllers can be used for the resource control of
> +realtime processes irrespective of CONFIG_RT_GROUP_SCHED.
>   
>   
>   CPU Interface Files

LGTM

Acked-by: Waiman Long <longman@redhat.com>