[systemd-devel] cgroupsv2 and realtime processes

Michał Zegan webczat at outlook.com
Mon Jun 6 14:54:03 UTC 2022


W dniu 6.06.2022 o 16:02, Michal Koutný pisze:
> Hello Michał.
>
> On Sun, Jun 05, 2022 at 03:28:23PM +0200, Michał Zegan <webczat at outlook.com> wrote:
>> I have kernel 5.17 on archlinux.
> How is your kernel configured wrt CONFIG_RT_GROUP_SCHED?
it is unset
>
>> Is that still true?
> That depends :-)
>
>> Yet, checking /proc/(pid)/cgroup states these processes are not in a root
>> cgroup, yet the cpu controller is enabled on the root cgroup
>> (/sys/fs/cgroup/cgroup.subtree_control lists "cpu" as one of the controllers
>> and I see the interface files in children).
>>
>> Can anyone explain the situation?
> With v2 and CONFIG_RT_GROUP_SCHED there's no way how to assign realtime
> budgets to cgroups and therefore realtime tasks cannot run in them.
>
> With !CONFIG_RT_GROUP_SCHED, there's (internally) only the root cgroup
> for realtime tasks and things apparently work.
>
> See also [1].
this note pointed to in the readme is quite cgroups v1 specific, I 
believe what it describes was true in v1, and v2 does not have any 
capability to control realtime processes in non root cgroups if I read 
correctly.
>
>> <snip>
>> The cgroupsv2 documentation states that cgroup cpu controller
>> currently does not support realtime processes, so to enable it all
>> realtime processes must be moved to root cgroup.
> Will you send a docs patch with the CONFIG_RT_GROUP_SCHED reservation?
> :-p
>
> HTH,
> Michal
>
> [1] https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsystemd%2Fsystemd%2Fblob%2F369151c9c73b12fb7a88fc2b558499c2d4832982%2FREADME%23L140&data=05%7C01%7C%7C2497332c429b4459b16308da47c5367e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637901209614621463%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=dXYxa0cDT48qoJDUwJKA%2B2d7vBLYxdc1TuZztaQqQWI%3D&reserved=0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xE6516A8A8E25955D.asc
Type: application/pgp-keys
Size: 10971 bytes
Desc: OpenPGP public key
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20220606/048529f7/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20220606/048529f7/attachment.sig>


More information about the systemd-devel mailing list