ANDROID: sched: EAS: take cstate into account when selecting idle core
authorSrinath Sridharan <srinathsr@google.com>
Sat, 4 Nov 2017 15:14:15 +0000 (15:14 +0000)
committerChris Redpath <chris.redpath@arm.com>
Tue, 19 Dec 2017 16:51:08 +0000 (16:51 +0000)
commit7f6fb825d6bc1e980181ca19adb2ef090001c882
tree087d1d0402dab534a74a014ea3e0c7c385cf0f5c
parentf1ec666a62dec1083ed52fe1ddef093b84373aaf
ANDROID: sched: EAS: take cstate into account when selecting idle core

Introduce a new sysctl for this option, 'sched_cstate_aware'.
When this is enabled, select_idle_sibling in CFS is modified to
choose the idle CPU in the sibling group which has the lowest
idle state index - idle state indexes are assumed to increase
as sleep depth and hence wakeup latency increase. In this way,
we attempt to minimise wakeup latency when an idle CPU is
required.

Signed-off-by: Srinath Sridharan <srinathsr@google.com>
Includes:
sched: EAS: fix select_idle_sibling
when sysctl_sched_cstate_aware is enabled, best_idle cpu will not be chosen
in the original flow because it will goto done directly

Bug: 30107557
Change-Id: Ie09c2e3960cafbb976f8d472747faefab3b4d6ac
Signed-off-by: martin_liu <martin_liu@htc.com>
Signed-off-by: Andres Oportus <andresoportus@google.com>
[refactored and fixed conflicts]
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
include/linux/sched/sysctl.h
kernel/sched/fair.c
kernel/sysctl.c