diff options
author | Cyril Hrubis <[email protected]> | 2023-08-02 17:19:06 +0200 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2023-08-14 17:01:23 +0200 |
commit | c1fc6484e1fb7cc2481d169bfef129a1b0676abe (patch) | |
tree | ad882f520d5693828da11accf488e88eddc44517 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | c7fcb99877f9f542c918509b2801065adcaf46fa (diff) |
sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset
The sched_rr_timeslice can be reset to default by writing value that is
<= 0. However after reading from this file we always got the last value
written, which is not useful at all.
$ echo -1 > /proc/sys/kernel/sched_rr_timeslice_ms
$ cat /proc/sys/kernel/sched_rr_timeslice_ms
-1
Fix this by setting the variable that holds the sysctl file value to the
jiffies_to_msecs(RR_TIMESLICE) in case that <= 0 value was written.
Signed-off-by: Cyril Hrubis <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Petr Vorel <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Tested-by: Petr Vorel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions