From bb11271068ff34434f5b8cefd0c2c0bae5ed7fd1 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 1 Nov 2012 18:48:11 +0100 Subject: sched: Only setting CPUSchedulingPriority=rr doesn't work 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 --- .gitignore | 1 + 1 file changed, 1 insertion(+) (limited to '.gitignore') diff --git a/.gitignore b/.gitignore index 18e4e23c50..3fbd83e0e6 100644 --- a/.gitignore +++ b/.gitignore @@ -90,6 +90,7 @@ /systemd /test-engine /test-job-type +/test-sched-prio /systemctl /systemadm .dirstamp -- cgit v1.2.3-54-g00ecf