acrn-kernel/kernel/sched
Cyril Hrubis 5552b7bf26 sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset
commit c1fc6484e1 upstream.

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 <chrubis@suse.cz>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Acked-by: Mel Gorman <mgorman@suse.de>
Tested-by: Petr Vorel <pvorel@suse.cz>
Cc: Mahmoud Adam <mngyadam@amazon.com>
Link: https://lore.kernel.org/r/20230802151906.25258-3-chrubis@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-01 13:26:24 +01:00
..
Makefile
autogroup.c
autogroup.h
build_policy.c
build_utility.c
clock.c
completion.c
core.c sched: Fix stop_one_cpu_nowait() vs hotplug 2023-11-20 11:51:50 +01:00
core_sched.c
cpuacct.c
cpudeadline.c
cpudeadline.h
cpufreq.c
cpufreq_schedutil.c cpufreq: schedutil: Update next_freq when cpufreq_limits change 2023-10-25 12:03:11 +02:00
cpupri.c sched/rt: Fix live lock between select_fallback_rq() and RT push 2023-10-06 14:57:02 +02:00
cpupri.h
cputime.c
deadline.c sched: Fix stop_one_cpu_nowait() vs hotplug 2023-11-20 11:51:50 +01:00
debug.c
fair.c sched: Fix stop_one_cpu_nowait() vs hotplug 2023-11-20 11:51:50 +01:00
features.h
idle.c kernel/sched: Modify initial boot task idle setup 2023-10-06 14:57:02 +02:00
isolation.c
loadavg.c
membarrier.c sched/membarrier: reduce the ability to hammer on sys_membarrier 2024-02-23 09:12:52 +01:00
pelt.c
pelt.h
psi.c sched/psi: use kernfs polling functions for PSI trigger polling 2023-07-27 08:50:38 +02:00
rt.c sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset 2024-03-01 13:26:24 +01:00
sched-pelt.h
sched.h sched/deadline: Create DL BW alloc, free & check overflow interface 2023-08-30 16:11:11 +02:00
smp.h
stats.c
stats.h
stop_task.c
swait.c
topology.c
wait.c
wait_bit.c