Loading kernel/sched/core.c +9 −1 Original line number Diff line number Diff line Loading @@ -2187,15 +2187,19 @@ static int select_fallback_rq(int cpu, struct task_struct *p, bool allow_iso) */ static inline int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags, int sibling_count_hint) __attribute__((unused))int sibling_count_hint) { bool allow_isolated = (p->flags & PF_KTHREAD); lockdep_assert_held(&p->pi_lock); if (p->nr_cpus_allowed > 1) #ifdef CONFIG_SCHED_WALT cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags, sibling_count_hint); #else cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags); #endif else cpu = cpumask_any(p->cpus_ptr); Loading Loading @@ -3624,7 +3628,11 @@ void sched_exec(void) return; raw_spin_lock_irqsave(&p->pi_lock, flags); #ifdef CONFIG_SCHED_WALT dest_cpu = p->sched_class->select_task_rq(p, task_cpu(p), SD_BALANCE_EXEC, 0, 1); #else dest_cpu = p->sched_class->select_task_rq(p, task_cpu(p), SD_BALANCE_EXEC, 0); #endif if (dest_cpu == smp_processor_id()) goto unlock; Loading kernel/sched/deadline.c +4 −0 Original line number Diff line number Diff line Loading @@ -1602,8 +1602,12 @@ static void yield_task_dl(struct rq *rq) static int find_later_rq(struct task_struct *task); static int #ifdef CONFIG_SCHED_WALT select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags, int sibling_count_hint) #else select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags) #endif { struct task_struct *curr; struct rq *rq; Loading kernel/sched/fair.c +17 −0 Original line number Diff line number Diff line Loading @@ -7218,8 +7218,12 @@ int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, * preempt must be disabled. */ static int #ifdef CONFIG_SCHED_WALT select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags, int sibling_count_hint) #else select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags) #endif { struct sched_domain *tmp, *sd = NULL; int cpu = smp_processor_id(); Loading @@ -7229,8 +7233,12 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f if (sched_energy_enabled()) { rcu_read_lock(); #ifdef CONFIG_SCHED_WALT new_cpu = find_energy_efficient_cpu(p, prev_cpu, sync, sibling_count_hint); #else new_cpu = find_energy_efficient_cpu(p, prev_cpu, sync, 1); #endif if (unlikely(new_cpu < 0)) new_cpu = prev_cpu; rcu_read_unlock(); Loading @@ -7241,15 +7249,24 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f record_wakee(p); if (sched_energy_enabled()) { #ifdef CONFIG_SCHED_WALT new_cpu = find_energy_efficient_cpu(p, prev_cpu, sync, sibling_count_hint); #else new_cpu = find_energy_efficient_cpu(p, prev_cpu, sync, 1); #endif if (new_cpu >= 0) return new_cpu; new_cpu = prev_cpu; } #ifdef CONFIG_SCHED_WALT want_affine = !wake_wide(p, sibling_count_hint) && cpumask_test_cpu(cpu, p->cpus_ptr); #else want_affine = !wake_wide(p, 1) && cpumask_test_cpu(cpu, p->cpus_ptr); #endif } rcu_read_lock(); Loading kernel/sched/idle.c +4 −0 Original line number Diff line number Diff line Loading @@ -364,8 +364,12 @@ void cpu_startup_entry(enum cpuhp_state state) #ifdef CONFIG_SMP static int #ifdef CONFIG_SCHED_WALT select_task_rq_idle(struct task_struct *p, int cpu, int sd_flag, int flags, int sibling_count_hint) #else select_task_rq_idle(struct task_struct *p, int cpu, int sd_flag, int flags) #endif { return task_cpu(p); /* IDLE tasks as never migrated */ } Loading kernel/sched/rt.c +4 −0 Original line number Diff line number Diff line Loading @@ -1521,8 +1521,12 @@ task_may_not_preempt(struct task_struct *task, int cpu) } static int #ifdef CONFIG_SCHED_WALT select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags, int sibling_count_hint) #else select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags) #endif { struct task_struct *curr; struct rq *rq; Loading Loading
kernel/sched/core.c +9 −1 Original line number Diff line number Diff line Loading @@ -2187,15 +2187,19 @@ static int select_fallback_rq(int cpu, struct task_struct *p, bool allow_iso) */ static inline int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags, int sibling_count_hint) __attribute__((unused))int sibling_count_hint) { bool allow_isolated = (p->flags & PF_KTHREAD); lockdep_assert_held(&p->pi_lock); if (p->nr_cpus_allowed > 1) #ifdef CONFIG_SCHED_WALT cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags, sibling_count_hint); #else cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags); #endif else cpu = cpumask_any(p->cpus_ptr); Loading Loading @@ -3624,7 +3628,11 @@ void sched_exec(void) return; raw_spin_lock_irqsave(&p->pi_lock, flags); #ifdef CONFIG_SCHED_WALT dest_cpu = p->sched_class->select_task_rq(p, task_cpu(p), SD_BALANCE_EXEC, 0, 1); #else dest_cpu = p->sched_class->select_task_rq(p, task_cpu(p), SD_BALANCE_EXEC, 0); #endif if (dest_cpu == smp_processor_id()) goto unlock; Loading
kernel/sched/deadline.c +4 −0 Original line number Diff line number Diff line Loading @@ -1602,8 +1602,12 @@ static void yield_task_dl(struct rq *rq) static int find_later_rq(struct task_struct *task); static int #ifdef CONFIG_SCHED_WALT select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags, int sibling_count_hint) #else select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags) #endif { struct task_struct *curr; struct rq *rq; Loading
kernel/sched/fair.c +17 −0 Original line number Diff line number Diff line Loading @@ -7218,8 +7218,12 @@ int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, * preempt must be disabled. */ static int #ifdef CONFIG_SCHED_WALT select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags, int sibling_count_hint) #else select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags) #endif { struct sched_domain *tmp, *sd = NULL; int cpu = smp_processor_id(); Loading @@ -7229,8 +7233,12 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f if (sched_energy_enabled()) { rcu_read_lock(); #ifdef CONFIG_SCHED_WALT new_cpu = find_energy_efficient_cpu(p, prev_cpu, sync, sibling_count_hint); #else new_cpu = find_energy_efficient_cpu(p, prev_cpu, sync, 1); #endif if (unlikely(new_cpu < 0)) new_cpu = prev_cpu; rcu_read_unlock(); Loading @@ -7241,15 +7249,24 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f record_wakee(p); if (sched_energy_enabled()) { #ifdef CONFIG_SCHED_WALT new_cpu = find_energy_efficient_cpu(p, prev_cpu, sync, sibling_count_hint); #else new_cpu = find_energy_efficient_cpu(p, prev_cpu, sync, 1); #endif if (new_cpu >= 0) return new_cpu; new_cpu = prev_cpu; } #ifdef CONFIG_SCHED_WALT want_affine = !wake_wide(p, sibling_count_hint) && cpumask_test_cpu(cpu, p->cpus_ptr); #else want_affine = !wake_wide(p, 1) && cpumask_test_cpu(cpu, p->cpus_ptr); #endif } rcu_read_lock(); Loading
kernel/sched/idle.c +4 −0 Original line number Diff line number Diff line Loading @@ -364,8 +364,12 @@ void cpu_startup_entry(enum cpuhp_state state) #ifdef CONFIG_SMP static int #ifdef CONFIG_SCHED_WALT select_task_rq_idle(struct task_struct *p, int cpu, int sd_flag, int flags, int sibling_count_hint) #else select_task_rq_idle(struct task_struct *p, int cpu, int sd_flag, int flags) #endif { return task_cpu(p); /* IDLE tasks as never migrated */ } Loading
kernel/sched/rt.c +4 −0 Original line number Diff line number Diff line Loading @@ -1521,8 +1521,12 @@ task_may_not_preempt(struct task_struct *task, int cpu) } static int #ifdef CONFIG_SCHED_WALT select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags, int sibling_count_hint) #else select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags) #endif { struct task_struct *curr; struct rq *rq; Loading