[LTP] [PATCH 2/2] sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset

Mel Gorman mgorman@suse.de
Thu Jul 20 12:00:02 CEST 2023


On Wed, Jul 19, 2023 at 12:37:43PM +0200, Cyril Hrubis wrote:
> 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>
> CC: Jiri Bohac <jbohac@suse.cz>

Acked-by: Mel Gorman <mgorman@suse.de>

-- 
Mel Gorman
SUSE Labs


More information about the ltp mailing list