• Holger Hans Peter Freyther's avatar
    sched: Only setting CPUSchedulingPriority=rr doesn't work · bb112710
    Holger Hans Peter Freyther authored
    A service that only sets the scheduling policy to round-robin
    fails to be started. This is because the cpu_sched_priority is
    initialized to 0 and is not adjusted when the policy is changed.
    
    Clamp the cpu_sched_priority when the scheduler policy is set. Use
    the current policy to validate the new priority.
    
    Change the manual page to state that the given range only applies
    to the real-time scheduling policies.
    
    Add a testcase that verifies this change:
    
    $ make test-sched-prio; ./test-sched-prio
    [test/sched_idle_bad.service:6] CPU scheduling priority is out of range, ignoring: 1
    [test/sched_rr_bad.service:7] CPU scheduling priority is out of range, ignoring: 0
    [test/sched_rr_bad.service:8] CPU scheduling priority is out of range, ignoring: 100
    bb112710
Name
Last commit
Last update
..
TEST-01-BASIC Loading commit data...
TEST-02-CRYPTSETUP Loading commit data...
.gitignore Loading commit data...
Makefile Loading commit data...
README.testsuite Loading commit data...
a.service Loading commit data...
b.service Loading commit data...
c.service Loading commit data...
d.service Loading commit data...
e.service Loading commit data...
f.service Loading commit data...
g.service Loading commit data...
h.service Loading commit data...
rule-syntax-check.py Loading commit data...
rules-test.sh Loading commit data...
sched_idle_bad.service Loading commit data...
sched_idle_ok.service Loading commit data...
sched_rr_bad.service Loading commit data...
sched_rr_change.service Loading commit data...
sched_rr_ok.service Loading commit data...
sys.tar.xz Loading commit data...
test-functions Loading commit data...
udev-test.pl Loading commit data...