hmp: dont attempt to pull tasks if affinity doesn't allow it
authorChris Redpath <chris.redpath@arm.com>
Fri, 2 May 2014 13:30:02 +0000 (14:30 +0100)
committerRobin Murphy <robin.murphy@arm.com>
Tue, 26 Aug 2014 15:29:53 +0000 (16:29 +0100)
commit5802ceca3b2e52f03a53b3568c394ef8e5da9516
treecf683d400d3e94d4538809dd9c0d9adb659d6699
parentb8ae55322833d030e1a1ce1be1836e634fc4989c
hmp: dont attempt to pull tasks if affinity doesn't allow it

When looking for a task to be idle-pulled, don't consider tasks
where the affinity does not allow that task to be placed on the
target CPU. Also ensure that tasks with restricted affinity
do not block selecting other unrestricted busy tasks.

Use the knowledge of target CPU more effectively in idle pull
by passing to hmp_get_heaviest_task when we know it, otherwise
only checking for general affinity matches with any of the CPUs
in the bigger HMP domain.

We still need to explicitly check affinity is allowed in idle pull
since if we find no match in hmp_get_heaviest_task we will return
the current one, which may not be affine to the new CPU despite
having high enough load. In this case, there is nothing to move.

Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
kernel/sched/fair.c