CONFIG_RT_GROUP_SCHED=y harmuflull for real time applications


Recommended Posts

Since linux v5.4 armbian_build enables the CONFIG_RT_GROUP_SCHED config option.


Some armbian users use the soft real-time features for either real-time audio (jackd), or control (eg. klipper_host_mcu),

However, real-time group scheduling, enabled by this options complicates the user space configuration required to acquire real-time scheduling in applications and daemons.


Setting ulimit -r or LimitRTPRIO= is no longer enough, it is also required to allocate CPU time for RT task. In a brutal way this can be done as 

echo 950000 > /sys/fs/cgroup/cpu,cpuacct/{system,user}.slice/cpu.rt_runtime_us

JACK documentation recommends using cgroup-tools for configuration. This is redundant with systemd's own configuration of cgroups hierarchies.


However, it is currently not possible to setup with systemd configs files: the team responded "wontfix, accounting rules for RT_GROUP_SCHED are too convoluted for systemd to support"

The systemd's README was updated with the follwing warning:


We recommend to turn off Real-Time group scheduling in the

kernel when using systemd. RT group scheduling effectively

makes RT scheduling unavailable for most userspace, since it

requires explicit assignment of RT budgets to each unit whose

processes making use of RT. As there's no sensible way to

assign these budgets automatically this cannot really be

fixed, and it's best to disable group scheduling hence.



I was hesitant to open an issue on armbuild_config. The changes in the config file are quite recent (Dec 2019) and probably unintentional (kernel default).

But, I could be missing something. Surely lots of folks use RT scheduling on their board. Maybe along with an older kernel ?

Does real-time group scheduling have any use on SBC ?

Do you have simpler solution for this problem (other than CONFIG_RT_GROUP_SCHED=n) ?

Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.