sched/fair: Derive the downmigration margin wrt the destination CPU
Currently the downmigration margin is derived wrt the source CPU i.e
the CPU on which the task is running or last run. This approach has
problems on a tri cluster when the downmigration evaluation happens
from the max capacity CPU to the min capacity CPU.
For example, consider the following migration thresholds configuration
echo 65 85 > /proc/sys/kernel/sched_downmigrate
echo 71 95 > /proc/sys/kernel/sched_upmigrate
A task should comeback from the higher capacity cluster to the min
capacity cluster only when the task demand falls below the 65% of
the capacity of the min capacity cluster. However the current code
uses the downmigration threshold wrt the source CPU which could be
either 65% when task is running on mid capacity cluster or 85% when
task is running on max capacity cluster. This results in an incorrect
task placement on min capacity cluster though the task does not fit
there. To fix this, derive the downmigration margin wrt the destination
CPU. This matches with the upmigration margin which is derived wrt
the source CPU.
Change-Id: I973b5746c98b30714004f1ade4f5e949aded5cce
Signed-off-by:
Pavankumar Kondeti <pkondeti@codeaurora.org>
Loading
Please register or sign in to comment