HMP: select 'best' task for migration rather than 'current'
authorChris Redpath <chris.redpath@arm.com>
Mon, 19 Aug 2013 14:06:15 +0000 (15:06 +0100)
committerJon Medhurst <tixy@linaro.org>
Mon, 19 Aug 2013 14:41:36 +0000 (15:41 +0100)
commitee52487aaf659ef630ce3371de0e59944253581b
tree6a0d5cff0c233baf89e856557e2d74de82c660cd
parenta0e1bccdf9f1c4d68ea024e4254dbbd1eff96a4a
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