Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c5db4b9c authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Satya Durga Srinivasu Prabhala
Browse files

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: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 913365b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment