From a4ebdf8b3f5b4dada602807f309da08b7e80058d Mon Sep 17 00:00:00 2001 From: Park Bumgyu Date: Fri, 13 Apr 2018 11:20:57 +0900 Subject: [PATCH] sched: ems: remove exynos_fit_idlest_group() Since exynos_proper_cpu() is implemented, exynos no longer calls find_idlest_group(). Therefore, exynos_fit_idlest_group() is no longer needed. Change-Id: Ia04391c3406f8cfe0215fc20ea966b4a1d8c8228 Signed-off-by: Park Bumgyu --- include/linux/ems.h | 4 ---- kernel/sched/ems/core.c | 31 ------------------------------- kernel/sched/fair.c | 6 ------ 3 files changed, 41 deletions(-) diff --git a/include/linux/ems.h b/include/linux/ems.h index bfb35a3ab193..cd782583e886 100644 --- a/include/linux/ems.h +++ b/include/linux/ems.h @@ -32,8 +32,6 @@ struct gb_qos_request { }; #ifdef CONFIG_SCHED_EMS -extern struct sched_group *exynos_fit_idlest_group(struct sched_domain *sd, - struct task_struct *p); extern void exynos_init_entity_util_avg(struct sched_entity *se); extern int exynos_need_active_balance(enum cpu_idle_type idle, struct sched_domain *sd, int src_cpu, int dst_cpu); @@ -56,8 +54,6 @@ extern void gb_qos_update_request(struct gb_qos_request *req, u32 new_value); extern void request_kernel_prefer_perf(int grp_idx, int enable); #else -static inline struct sched_group *exynos_fit_idlest_group(struct sched_domain *sd, - struct task_struct *p) { return NULL; } static inline void exynos_init_entity_util_avg(struct sched_entity *se) { } static inline int exynos_need_active_balance(enum cpu_idle_type idle, struct sched_domain *sd, int src_cpu, int dst_cpu) { return 0; } diff --git a/kernel/sched/ems/core.c b/kernel/sched/ems/core.c index 03efea678f83..341eb2e0c4ad 100644 --- a/kernel/sched/ems/core.c +++ b/kernel/sched/ems/core.c @@ -32,37 +32,6 @@ int cpu_util_wake(int cpu, struct task_struct *p) return (util >= capacity) ? capacity : util; } -static inline int task_fits(struct task_struct *p, long capacity) -{ - return capacity * 1024 > task_util(p) * 1248; -} - -struct sched_group * -exynos_fit_idlest_group(struct sched_domain *sd, struct task_struct *p) -{ - struct sched_group *group = sd->groups; - struct sched_group *fit_group = NULL; - unsigned long fit_capacity = ULONG_MAX; - - do { - int i; - - /* Skip over this group if it has no CPUs allowed */ - if (!cpumask_intersects(sched_group_span(group), - &p->cpus_allowed)) - continue; - - for_each_cpu(i, sched_group_span(group)) { - if (capacity_of(i) < fit_capacity && task_fits(p, capacity_of(i))) { - fit_capacity = capacity_of(i); - fit_group = group; - } - } - } while (group = group->next, group != sd->groups); - - return fit_group; -} - static inline int check_cpu_capacity(struct rq *rq, struct sched_domain *sd) { diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 23429156ab78..c00cbfb07cdd 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6276,12 +6276,6 @@ find_idlest_group(struct sched_domain *sd, struct task_struct *p, unsigned long imbalance = scale_load_down(NICE_0_LOAD) * (sd->imbalance_pct-100) / 100; - if (sched_feat(EXYNOS_MS)) { - idlest = exynos_fit_idlest_group(sd, p); - if (idlest) - return idlest; - } - if (sd_flag & SD_BALANCE_WAKE) load_idx = sd->wake_idx; -- 2.20.1