Lines Matching defs:dst_cpu

2677 				int src_nid, int dst_cpu)
2680 int dst_nid = cpu_to_node(dst_cpu);
2719 this_cpupid = cpu_pid_to_cpupid(dst_cpu, current->pid);
2820 int dst_cpu, dst_nid;
2920 struct rq *rq = cpu_rq(env->dst_cpu);
2923 if (env->best_cpu != env->dst_cpu && xchg(&rq->numa_migrate_on, 1)) {
2925 int start = env->dst_cpu;
2934 env->dst_cpu = cpu;
2935 rq = cpu_rq(env->dst_cpu);
2949 if (env->best_cpu != -1 && env->best_cpu != env->dst_cpu) {
2961 env->best_cpu = env->dst_cpu;
3001 * be improved if the source tasks was migrated to the target dst_cpu taking
3002 * into account that it might be best if task running on the dst_cpu should
3009 struct rq *dst_rq = cpu_rq(env->dst_cpu);
3156 cpu = env->dst_cpu;
3167 env->dst_cpu = cpu;
3224 env->dst_cpu = env->dst_stats.idle_cpu;
3243 env->dst_cpu = cpu;
6578 static inline int lb_throttled_hierarchy(struct task_struct *p, int dst_cpu)
6580 return throttled_hierarchy(tg_cfs_rq(task_group(p), dst_cpu));
7614 static inline int lb_throttled_hierarchy(struct task_struct *p, int dst_cpu)
8931 * @dst_cpu: CPU @p migrates to, -1 if @p moves from @cpu or @p == NULL
8969 cpu_util(int cpu, struct task_struct *p, int dst_cpu, int boost)
8971 bool add_task = p && task_cpu(p) != cpu && dst_cpu == cpu;
8972 bool sub_task = p && task_cpu(p) == cpu && dst_cpu != cpu;
8978 * If @dst_cpu is -1 or @p migrates from @cpu to @dst_cpu remove its
9006 * If @dst_cpu == @cpu add it to "simulate" cpu_util after @p
9009 * During exec (@dst_cpu = -1) @p is enqueued and does
9029 if (dst_cpu == cpu)
9246 * is placed on the cpu @dst_cpu.
9253 struct task_struct *p, int dst_cpu)
9259 struct task_struct *tsk = (cpu == dst_cpu) ? p : NULL;
9260 unsigned long util = cpu_util(cpu, p, dst_cpu, 1);
9295 * consume for a given utilization landscape @eenv. When @dst_cpu < 0, the task
9300 struct cpumask *pd_cpus, struct task_struct *p, int dst_cpu)
9302 unsigned long max_util = eenv_pd_max_util(eenv, pd_cpus, p, dst_cpu);
9306 if (dst_cpu >= 0)
9311 trace_sched_compute_energy_tp(p, dst_cpu, energy, max_util, busy_time);
10264 int dst_cpu;
10319 if (!sched_core_cookie_match(cpu_rq(env->dst_cpu), p))
10349 dst_nid = cpu_to_node(env->dst_cpu);
10521 * src_cpu and dst_cpu are arbitrary CPUs within the source
10524 static enum llc_mig can_migrate_llc(int src_cpu, int dst_cpu,
10531 !get_llc_stats(dst_cpu, &dst_util, &dst_cap))
10570 static enum llc_mig can_migrate_llc_task(int src_cpu, int dst_cpu,
10582 if (cpu < 0 || cpus_share_cache(src_cpu, dst_cpu))
10586 if (invalid_llc_nr(mm, p, dst_cpu) ||
10587 exceed_llc_capacity(mm, dst_cpu)) {
10593 if (cpus_share_cache(dst_cpu, cpu))
10600 return can_migrate_llc(src_cpu, dst_cpu,
10618 if (cpus_share_cache(env->src_cpu, env->dst_cpu))
10640 if (can_migrate_llc(env->src_cpu, env->dst_cpu,
10650 * env->dst_cpu breaks LLC localiy.
10673 * run on env->dst_cpu, skip the tasks do not prefer
10674 * env->dst_cpu, and find the one that prefers.
10677 READ_ONCE(p->preferred_llc) != llc_id(env->dst_cpu))
10681 env->dst_cpu, p) != mig_forbid)
10730 if (lb_throttled_hierarchy(p, env->dst_cpu))
10740 task_is_ineligible_on_dst_cpu(p, env->dst_cpu))
10750 if (!cpumask_test_cpu(env->dst_cpu, p->cpus_ptr)) {
10771 /* Prevent to re-select dst_cpu via env's CPUs: */
10782 /* Record that we found at least one task that could run on dst_cpu */
10853 set_task_cpu(p, env->dst_cpu);
11576 static inline bool sched_asym(struct sched_domain *sd, int dst_cpu, int src_cpu)
11579 * First check if @dst_cpu can do asym_packing load balance. Only do it
11582 return sched_use_asym_prio(sd, dst_cpu) &&
11583 sched_asym_prefer(dst_cpu, src_cpu);
11592 * @env::dst_cpu can do asym_packing if it has higher priority than the
11595 * Return: true if @env::dst_cpu can do with asym_packing load balance. False
11609 return sched_asym(env->sd, env->dst_cpu, READ_ONCE(group->asym_prefer_cpu));
11707 if (env->sd->child != rcu_dereference_all(per_cpu(sd_llc, env->dst_cpu)))
11733 * to run on LLC in idle dst_cpu.
11754 env->dst_cpu, 0, true) == mig_llc)
11765 * There are more tasks that want to run on dst_cpu's LLC.
11830 dst_llc = llc_id(env->dst_cpu);
11933 * When SMT is active, only pull a misfit to dst_cpu if it is on a
11941 !capacity_greater(capacity_of(env->dst_cpu), sg->sgc->max_capacity) ||
12059 (capacity_greater(sg->sgc->min_capacity, capacity_of(env->dst_cpu))))
12511 env->dst_core_idle = !sched_smt_active() || is_core_idle(env->dst_cpu);
12517 local_group = cpumask_test_cpu(env->dst_cpu, sched_group_span(sg));
12524 update_group_capacity(env->sd, env->dst_cpu);
12772 * nr_idle : dst_cpu is not busy and the number of idle CPUs is quite
12979 !capacity_greater(capacity_of(env->dst_cpu), capacity) &&
12990 if (sched_asym(env->sd, i, env->dst_cpu) && nr_running == 1)
13064 dst_llc = llc_id(env->dst_cpu);
13100 * the lower priority @env::dst_cpu help it. Do not follow
13103 return env->idle && sched_use_asym_prio(env->sd, env->dst_cpu) &&
13104 (sched_asym_prefer(env->dst_cpu, env->src_cpu) ||
13139 * The dst_cpu is idle and the src_cpu CPU has only 1 CFS task.
13142 * available on dst_cpu.
13147 (capacity_of(env->src_cpu)*sd->imbalance_pct < capacity_of(env->dst_cpu)*100))
13170 if (!cpumask_test_cpu(env->dst_cpu, env->cpus))
13215 return cpu == env->dst_cpu;
13220 return idle_smt == env->dst_cpu;
13223 return group_balance_cpu(sg) == env->dst_cpu;
13281 .dst_cpu = this_cpu,
13375 * us and move them to an alternate dst_cpu in our sched_group
13394 /* Prevent to re-select dst_cpu via env's CPUs */
13395 __cpumask_clear_cpu(env.dst_cpu, env.cpus);
13398 env.dst_cpu = env.new_dst_cpu;
13651 .dst_cpu = target_cpu,
13803 * env->dst_cpu, so we can't know our idle