I attemped to google this question's same doubt of time slice of SCHED_RR
in Linux, but I did not get clear answer both from here and the kernel's source code.
After further checking, I found the key point is RR_TIMESLICE
is the default time slice in jiffies, not millisecond! So, the default time slice of SCHED_RR
is always 100ms, no matter what HZ
you've configured.
Same as the value of /proc/sys/kernel/sched_rr_timeslice_ms
, which input value is in milliseconds, but it stores and outputs in jiffies!
So, when your CONFIG_HZ=100
is set, you'll find that:
# echo 100 > /proc/sys/kernel/sched_rr_timeslice_ms
# cat /proc/sys/kernel/sched_rr_timeslice_ms
10
It's little bit confused, hope this can help you to understand it!
rt.h
appeared with Linux kernel 3.9. – Abscise