History

sched/rt: Show the 'sched_rr_timeslice' SCHED_RR timeslice tuning knob in milliseconds

We added the 'sched_rr_timeslice_ms' SCHED_RR tuning knob in this commit: ce0dbbbb30ae ("sched/rt: Add a tuning knob to allow changing SCHED_RR timeslice") ... which name suggests to users that it's in milliseconds, while in reality it's being set in milliseconds but the result is shown in jiffies. This is obviously confusing when HZ is not 1000, it makes it appear like the value set failed, such as HZ=100: root# echo 100 > /proc/sys/kernel/sched_rr_timeslice_ms root# cat /proc/sys/kernel/sched_rr_timeslice_ms 10 Fix this to be milliseconds all around.

Shile Zhang committed 9 years ago

Commit 975e1551 parent 733ce724 files · +6 −3Browse files

Showing the changes to kernel/sysctl.c (1 of 4 files). Show all

Unified · Split

kernel/sysctl.c+1−1
@@ -416,7 +416,7 @@ static struct ctl_table kern_table[] = { · 415 unmodified lines
416416 },
417417 {
418418 .procname = "sched_rr_timeslice_ms",
419− .data = &sched_rr_timeslice,
419+ .data = &sysctl_sched_rr_timeslice,
420420 .maxlen = sizeof(int),
421421 .mode = 0644,
422422 .proc_handler = sched_rr_handler,