chrt: Add --sched_runtime support for SCHED_{OTHER,BATCH} policies
Apply --sched_runtime to SCHED_{OTHER,BATCH} in addition to
SCHED_DEADLINE, supporting Linux kernel patch:
commit
857b158dc5e8 ("sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion")
(2024-08-17 Peter Zijlstra)
This patch is present in kernel versions starting with 6.12 and allows
setting custom slice length on fair tasks via the sched_runtime parameter.
Using this new feature:
/* change policy to SCHED_BATCH and set custom slice to 0.1ms */
chrt -v -b -T 100000 -p 0 $PID
pid $PID's current scheduling policy: SCHED_OTHER
pid $PID's current scheduling priority: 0
pid $PID's current runtime parameter:
2250000
pid $PID's new scheduling policy: SCHED_BATCH
pid $PID's new scheduling priority: 0
pid $PID's new runtime parameter: 100000
Signed-off-by: Petre Tudor <petre-ionut.tudor@arm.com>