From 89b581f5723bba7fb2cfc0f4f96acf929923b863 Mon Sep 17 00:00:00 2001 From: Daeyeong Lee Date: Tue, 12 Jun 2018 15:15:42 +0900 Subject: [PATCH] sched: ems: ontime: Use get_cpu_mips instead of capacity_orig_of. - The value of capacity_orig_of can be changed at runtime. Ontime feature need to use stable value that indicating performance of cpu. So use get_cpu_mips instead of capacity_orig_of. Change-Id: If249f6841cc26abce573459d8199004beccdeac8 Signed-off-by: Daeyeong Lee --- kernel/sched/ems/ontime.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/sched/ems/ontime.c b/kernel/sched/ems/ontime.c index e102284be972..0c0d7b2d5127 100644 --- a/kernel/sched/ems/ontime.c +++ b/kernel/sched/ems/ontime.c @@ -468,8 +468,7 @@ void ontime_migration(void) * don't need to ontime migration. */ ontime_select_fit_cpus(p, &fit_cpus); - if (capacity_orig_of(cpu) >= - capacity_orig_of(cpumask_first(&fit_cpus))) { + if (get_cpu_mips(cpu) >= get_cpu_mips(cpumask_first(&fit_cpus))) { raw_spin_unlock_irqrestore(&rq->lock, flags); continue; } @@ -546,7 +545,7 @@ int ontime_can_migration(struct task_struct *p, int dst_cpu) return true; } - if (capacity_orig_of(dst_cpu) > capacity_orig_of(src_cpu)) { + if (get_cpu_mips(dst_cpu) > get_cpu_mips(src_cpu)) { trace_ems_ontime_check_migrate(p, dst_cpu, true, "go to bigger"); return true; } -- 2.20.1