Piezo Posted December 15, 2020 Posted December 15, 2020 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: Quote 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. CONFIG_RT_GROUP_SCHED=n 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) ? 2 Quote
lanefu Posted February 18, 2021 Posted February 18, 2021 Id like to know more about this. Not sure if it’s enabled on all our kernels its possible you can disable via kernel arg in /boot/armbianEnv.txt 0 Quote
hexdump Posted February 18, 2021 Posted February 18, 2021 @Piezo - did you already try "sysctl -w kernel.sched_rt_runtime_us=-1" - it works well for me for jackd ... best wishes and good luck - hexdump 2 Quote
Piezo Posted October 27, 2021 Author Posted October 27, 2021 Thanks, I confirm that it work for this application too! (Sorry for the late reply. And dang, that typo in the title, no wonder I was to ashamed to come back here ) 0 Quote
Recommended Posts
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.