1

This happens both on Fedora and Garuda. Here are example error messages:

$ sysctl kernel/sched_deadline_period_min_us kernel/sched_rt_period_us kernel/sched_rt_runtime_us
kernel.sched_deadline_period_min_us = -1
kernel.sched_rt_period_us = -1
kernel.sched_rt_runtime_us = -1
$ chrt --deadline -P 50000 --pid 0 2236118
chrt: failed to set pid 2236118's policy: Invalid argument
$ sysctl kernel/sched_deadline_period_min_us kernel/sched_rt_period_us kernel/sched_rt_runtime_us
kernel.sched_deadline_period_min_us = -1
kernel.sched_rt_period_us = -1
kernel.sched_rt_runtime_us = -1
# chrt -d -P 50000 0 yes
chrt: failed to set pid 0's policy: Invalid argument

As you can see, the solution found here is not working. The cgconfig service doesn't exist, so the second answer is irrelevant. Permissions aren't a problem either
I ran strace on both calls. They both fail at sched_setattr:

sched_setattr(2236118, {size=56, sched_policy=SCHED_DEADLINE, sched_flags=0, sched_nice=0, sched_priority=0, sched_runtime=50000, sched_deadline=50000, sched_period=50000, sched_util_min=0, sched_util_max=0}, 0) =-1 EINVAL (Invalid argument)
sched_setattr(0, {size=56, sched_policy=SCHED_DEADLINE, sched_flags=0, sched_nice=0, sched_priority=0, sched_runtime=50000, sched_deadline=50000, sched_period=50000, sched_util_min=0, sched_util_max=0}, 0) = -1 EINVAL (Invalid argument)

I have also checked the manpages for sched_setattr. According to them, all the parameters are acceptable.

chrt versions:

chrt from util-linux 2.38
chrt from util-linux 2.37.4

1 Answer 1

0

Setting kernel.sched_deadline_period_min_us to 50 has solved the issue

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .