sched: Handle partial write failures in sched_updown_migrate_handler
The sched_upmigrate/sched_downmigrate tunable is set by passing
two values on a tri cluster system. proc_douintvec_capacity() can
return an error when any of the user specified value is out of range.
However it may result in partial update to sysctl data when the 1st
value is within the range but the 2nd value is not. Since an error
is returned to the tunable write system call, discard the partial
update to the tunable.
Before this patch,
> cat /proc/sys/kernel/sched_upmigrate
> 95 95
> echo 99 0 > /proc/sys/kernel/sched_upmigrate
> 99 95
After this patch,
> cat /proc/sys/kernel/sched_upmigrate
> 95 95
> echo 99 0 > /proc/sys/kernel/sched_upmigrate
> 95 95
This patch also refactors sched_updown_migrate_handler() to allocate
the temporary buffer only for write case.
Change-Id: I3c6b7eb12c4f38823022fa6420f1d9c3c8d05796
Signed-off-by:
Pavankumar Kondeti <pkondeti@codeaurora.org>
Loading
Please register or sign in to comment