HMP: select 'best' task for migration rather than 'current'
authorChris Redpath <chris.redpath@arm.com>
Thu, 8 Aug 2013 15:27:34 +0000 (16:27 +0100)
committerJon Medhurst <tixy@linaro.org>
Thu, 5 Sep 2013 17:09:16 +0000 (18:09 +0100)
commit83a3cdb6d37f700761be84a333d574709c5a0d2a
treecfa5b0bd05df24077bcbcda76315fc2c5dd79e41
parent0d5ddd14a8e67d35fad79caf479cca54a6788cc9
HMP: select 'best' task for migration rather than 'current'

When we are looking for a task to migrate up, select the heaviest
one in the first 5 runnable on the runqueue.

Likewise, when looking for a task to offload, select the lightest
one in the first 5 runnable on the runqueue.

Ensure task selected is runnable in the target domain.

This change is necessary in order to implement idle pull in a
sensible manner, but here is used in up-migration and offload to
select the correct target task.

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