sched/fair: Fix redundant load balancer reattempt due to LBF_ALL_PINNED

LBF_ALL_PINNED flag should cleared in can_migrate_task() if the task
can run on the destination CPU during load balance. In current code,
can_migrate_task() return incorrectly without clearing this flag
in case if the task can't be migrated to the destination CPU due to
cumulative window demand constraints. Since LBF_ALL_PINNED flag
is not cleared, load balancer thinks that none of the tasks running
on the busiest group can't be migrated to the destination CPU due
to affinity settings and tries to find another busiest group. Prevent
this incorrect reattempt of load balance by clearing LBF_ALL_PINNED
flag right after the task affinity check in can_migrate_task().

Change-Id: Iad1cf42b1aaf70106ee5ecfbd9499ccb6eb7497e
[clingutla@codeaurora.org: Resolved merge conflicts]
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
1 file changed