Loading kernel/sched/fair.c +2 −1 Original line number Diff line number Diff line Loading @@ -6850,10 +6850,11 @@ static int energy_aware_wake_cpu(struct task_struct *p, int target, int sync) struct related_thread_group *grp; cpumask_t search_cpus; int prev_cpu = task_cpu(p); int start_cpu = walt_start_cpu(prev_cpu); bool do_rotate = false; bool avoid_prev_cpu = false; sd = rcu_dereference(per_cpu(sd_ea, prev_cpu)); sd = rcu_dereference(per_cpu(sd_ea, start_cpu)); if (!sd) return target; Loading kernel/sched/rt.c +4 −2 Original line number Diff line number Diff line Loading @@ -1758,6 +1758,8 @@ static int find_lowest_rq(struct task_struct *task) int best_cpu_idle_idx = INT_MAX; int cpu_idle_idx = -1; enum sched_boost_policy placement_boost; int prev_cpu = task_cpu(task); int start_cpu = walt_start_cpu(prev_cpu); bool do_rotate = false; bool avoid_prev_cpu = false; Loading @@ -1780,7 +1782,7 @@ static int find_lowest_rq(struct task_struct *task) best_capacity = placement_boost ? 0 : ULONG_MAX; rcu_read_lock(); sd = rcu_dereference(per_cpu(sd_ea, task_cpu(task))); sd = rcu_dereference(per_cpu(sd_ea, start_cpu)); if (!sd) { rcu_read_unlock(); goto noea; Loading Loading @@ -1840,7 +1842,7 @@ static int find_lowest_rq(struct task_struct *task) */ util = cpu_util(cpu); if (avoid_prev_cpu && cpu == task_cpu(task)) if (avoid_prev_cpu && cpu == prev_cpu) continue; if (__cpu_overutilized(cpu, util + tutil)) Loading kernel/sched/walt.c +4 −0 Original line number Diff line number Diff line Loading @@ -2176,6 +2176,8 @@ static void sort_clusters(void) move_list(&cluster_head, &new_head, false); } int __read_mostly min_power_cpu; void walt_sched_energy_populated_callback(void) { struct sched_cluster *cluster; Loading Loading @@ -2220,6 +2222,8 @@ void walt_sched_energy_populated_callback(void) break; } } min_power_cpu = cpu; } mutex_unlock(&cluster_lock); Loading kernel/sched/walt.h +11 −0 Original line number Diff line number Diff line Loading @@ -285,6 +285,12 @@ void walt_irq_work(struct irq_work *irq_work); void walt_sched_init(struct rq *rq); extern int __read_mostly min_power_cpu; static inline int walt_start_cpu(int prev_cpu) { return sysctl_sched_is_big_little ? prev_cpu : min_power_cpu; } #else /* CONFIG_SCHED_WALT */ static inline void walt_sched_init(struct rq *rq) { } Loading Loading @@ -356,6 +362,11 @@ fixup_walt_sched_stats_common(struct rq *rq, struct task_struct *p, { } static inline int walt_start_cpu(int prev_cpu) { return prev_cpu; } #endif /* CONFIG_SCHED_WALT */ #endif Loading
kernel/sched/fair.c +2 −1 Original line number Diff line number Diff line Loading @@ -6850,10 +6850,11 @@ static int energy_aware_wake_cpu(struct task_struct *p, int target, int sync) struct related_thread_group *grp; cpumask_t search_cpus; int prev_cpu = task_cpu(p); int start_cpu = walt_start_cpu(prev_cpu); bool do_rotate = false; bool avoid_prev_cpu = false; sd = rcu_dereference(per_cpu(sd_ea, prev_cpu)); sd = rcu_dereference(per_cpu(sd_ea, start_cpu)); if (!sd) return target; Loading
kernel/sched/rt.c +4 −2 Original line number Diff line number Diff line Loading @@ -1758,6 +1758,8 @@ static int find_lowest_rq(struct task_struct *task) int best_cpu_idle_idx = INT_MAX; int cpu_idle_idx = -1; enum sched_boost_policy placement_boost; int prev_cpu = task_cpu(task); int start_cpu = walt_start_cpu(prev_cpu); bool do_rotate = false; bool avoid_prev_cpu = false; Loading @@ -1780,7 +1782,7 @@ static int find_lowest_rq(struct task_struct *task) best_capacity = placement_boost ? 0 : ULONG_MAX; rcu_read_lock(); sd = rcu_dereference(per_cpu(sd_ea, task_cpu(task))); sd = rcu_dereference(per_cpu(sd_ea, start_cpu)); if (!sd) { rcu_read_unlock(); goto noea; Loading Loading @@ -1840,7 +1842,7 @@ static int find_lowest_rq(struct task_struct *task) */ util = cpu_util(cpu); if (avoid_prev_cpu && cpu == task_cpu(task)) if (avoid_prev_cpu && cpu == prev_cpu) continue; if (__cpu_overutilized(cpu, util + tutil)) Loading
kernel/sched/walt.c +4 −0 Original line number Diff line number Diff line Loading @@ -2176,6 +2176,8 @@ static void sort_clusters(void) move_list(&cluster_head, &new_head, false); } int __read_mostly min_power_cpu; void walt_sched_energy_populated_callback(void) { struct sched_cluster *cluster; Loading Loading @@ -2220,6 +2222,8 @@ void walt_sched_energy_populated_callback(void) break; } } min_power_cpu = cpu; } mutex_unlock(&cluster_lock); Loading
kernel/sched/walt.h +11 −0 Original line number Diff line number Diff line Loading @@ -285,6 +285,12 @@ void walt_irq_work(struct irq_work *irq_work); void walt_sched_init(struct rq *rq); extern int __read_mostly min_power_cpu; static inline int walt_start_cpu(int prev_cpu) { return sysctl_sched_is_big_little ? prev_cpu : min_power_cpu; } #else /* CONFIG_SCHED_WALT */ static inline void walt_sched_init(struct rq *rq) { } Loading Loading @@ -356,6 +362,11 @@ fixup_walt_sched_stats_common(struct rq *rq, struct task_struct *p, { } static inline int walt_start_cpu(int prev_cpu) { return prev_cpu; } #endif /* CONFIG_SCHED_WALT */ #endif