summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorJoonwoo Park <joonwoop@codeaurora.org>2015-01-05 17:19:29 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:01:31 -0700
commitf4a6c4e3279218b9212a89b710b127b76cde8c4c (patch)
tree1a79f180642749f8ce2542b1aa7584e09d5d19c5 /kernel
parent6939c5ae7e1e6f75a7ae80bb7a151b1e8eafc452 (diff)
sched: add sched feature FORCE_CPU_THROTTLING_IMMINENT
Add a new sched feature FORCE_CPU_THROTTLING_IMMINENT to perform migration due to EA without checking frequency throttling. This option can give us better debugging and verification capability. Change-Id: Iba445961a7f9812528b4e3aa9c6ddf47a3aad583 [joonwoop@codeaurora.org: fixed trivial conflict in kernel/sched/features.h] Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/fair.c6
-rw-r--r--kernel/sched/features.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1d69e49a6bdf..cffeceec285c 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3828,8 +3828,12 @@ static inline int nr_big_tasks(struct rq *rq)
static inline int is_cpu_throttling_imminent(int cpu)
{
int throttling = 0;
- struct cpu_pwr_stats *per_cpu_info = get_cpu_pwr_stats();
+ struct cpu_pwr_stats *per_cpu_info;
+
+ if (sched_feat(FORCE_CPU_THROTTLING_IMMINENT))
+ return 1;
+ per_cpu_info = get_cpu_pwr_stats();
if (per_cpu_info)
throttling = per_cpu_info[cpu].throttling;
return throttling;
diff --git a/kernel/sched/features.h b/kernel/sched/features.h
index 69631fa46c2f..fa71cb595e42 100644
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -69,3 +69,4 @@ SCHED_FEAT(RT_RUNTIME_SHARE, true)
SCHED_FEAT(LB_MIN, false)
SCHED_FEAT(ATTACH_AGE_LOAD, true)
+SCHED_FEAT(FORCE_CPU_THROTTLING_IMMINENT, false)