Lines Matching defs:prev_cpu
1236 static int select_idle_sibling(struct task_struct *p, int prev_cpu, int cpu);
7568 wake_affine_idle(int this_cpu, int prev_cpu, int sync)
7576 * If the prev_cpu is idle and cache affine then avoid a migration.
7578 * is more important than cache hot data on the prev_cpu and from
7582 if (available_idle_cpu(this_cpu) && cpus_share_cache(this_cpu, prev_cpu))
7583 return available_idle_cpu(prev_cpu) ? prev_cpu : this_cpu;
7592 if (available_idle_cpu(prev_cpu))
7593 return prev_cpu;
7600 int this_cpu, int prev_cpu, int sync)
7621 this_eff_load *= capacity_of(prev_cpu);
7623 prev_eff_load = cpu_load(cpu_rq(prev_cpu));
7642 int this_cpu, int prev_cpu, int sync)
7647 target = wake_affine_idle(this_cpu, prev_cpu, sync);
7650 target = wake_affine_weight(sd, p, this_cpu, prev_cpu, sync);
7654 return prev_cpu;
7725 int cpu, int prev_cpu, int sd_flag)
7730 return prev_cpu;
7734 * prev_cpu's last_update_time.
8179 * first. But prev_cpu or recent_used_cpu may also be a good candidate,
8450 struct task_struct *p, int prev_cpu)
8452 unsigned long busy_time, max_cap = arch_scale_cpu_capacity(prev_cpu);
8453 unsigned long irq = cpu_util_irq(cpu_rq(prev_cpu));
8611 static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu)
8632 * from sd_asym_cpucapacity spanning over this_cpu and prev_cpu.
8635 while (sd && !cpumask_test_cpu(prev_cpu, sched_domain_span(sd)))
8640 target = prev_cpu;
8646 eenv_task_busy_time(&eenv, p, prev_cpu);
8709 if (cpu == prev_cpu) {
8710 /* Always use prev_cpu as a candidate. */
8733 /* Evaluate the energy impact of using prev_cpu. */
8736 prev_cpu);
8800 select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags)
8805 int new_cpu = prev_cpu;
8822 new_cpu = find_energy_efficient_cpu(p, prev_cpu);
8825 new_cpu = prev_cpu;
8833 * If both 'cpu' and 'prev_cpu' are part of this domain,
8837 cpumask_test_cpu(prev_cpu, sched_domain_span(tmp))) {
8838 if (cpu != prev_cpu)
8839 new_cpu = wake_affine(tmp, p, cpu, prev_cpu, sync);
8858 return sched_balance_find_dst_cpu(sd, p, cpu, prev_cpu, sd_flag);
8862 return select_idle_sibling(p, prev_cpu, new_cpu);