sched: ems: ontime: Use get_cpu_mips instead of capacity_orig_of.
authorDaeyeong Lee <daeyeong.lee@samsung.com>
Tue, 12 Jun 2018 06:15:42 +0000 (15:15 +0900)
committerlakkyung.jung <lakkyung.jung@samsung.com>
Mon, 23 Jul 2018 05:59:23 +0000 (14:59 +0900)
- 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 <daeyeong.lee@samsung.com>
kernel/sched/ems/ontime.c

index e102284be97293105446a3ea5f22f75fed86f164..0c0d7b2d5127ee28a2224151ff49c0969502b3d9 100644 (file)
@@ -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;
        }