Loading kernel/sched/fair.c +11 −2 Original line number Diff line number Diff line Loading @@ -5892,7 +5892,7 @@ static void store_energy_calc_debug_info(struct energy_env *eenv, int cpu_idx, i * This works in iterations to compute the SG's energy for each CPU * candidate defined by the energy_env's cpu array. */ static void calc_sg_energy(struct energy_env *eenv) static int calc_sg_energy(struct energy_env *eenv) { struct sched_group *sg = eenv->sg; unsigned long busy_energy, idle_energy; Loading @@ -5914,6 +5914,12 @@ static void calc_sg_energy(struct energy_env *eenv) /* Compute IDLE energy */ idle_idx = group_idle_state(eenv, cpu_idx); if (unlikely(idle_idx < 0)) return idle_idx; if (idle_idx > sg->sge->nr_idle_states - 1) idle_idx = sg->sge->nr_idle_states - 1; idle_power = sg->sge->idle_states[idle_idx].power; idle_energy = SCHED_CAPACITY_SCALE - sg_util; idle_energy *= idle_power; Loading @@ -5923,6 +5929,8 @@ static void calc_sg_energy(struct energy_env *eenv) store_energy_calc_debug_info(eenv, cpu_idx, cap_idx, idle_idx); } return 0; } /* Loading Loading @@ -5988,7 +5996,8 @@ static int compute_energy(struct energy_env *eenv) * CPUs in the current visited SG. */ eenv->sg = sg; calc_sg_energy(eenv); if (calc_sg_energy(eenv)) return -EINVAL; /* remove CPUs we have just visited */ if (!sd->child) { Loading Loading
kernel/sched/fair.c +11 −2 Original line number Diff line number Diff line Loading @@ -5892,7 +5892,7 @@ static void store_energy_calc_debug_info(struct energy_env *eenv, int cpu_idx, i * This works in iterations to compute the SG's energy for each CPU * candidate defined by the energy_env's cpu array. */ static void calc_sg_energy(struct energy_env *eenv) static int calc_sg_energy(struct energy_env *eenv) { struct sched_group *sg = eenv->sg; unsigned long busy_energy, idle_energy; Loading @@ -5914,6 +5914,12 @@ static void calc_sg_energy(struct energy_env *eenv) /* Compute IDLE energy */ idle_idx = group_idle_state(eenv, cpu_idx); if (unlikely(idle_idx < 0)) return idle_idx; if (idle_idx > sg->sge->nr_idle_states - 1) idle_idx = sg->sge->nr_idle_states - 1; idle_power = sg->sge->idle_states[idle_idx].power; idle_energy = SCHED_CAPACITY_SCALE - sg_util; idle_energy *= idle_power; Loading @@ -5923,6 +5929,8 @@ static void calc_sg_energy(struct energy_env *eenv) store_energy_calc_debug_info(eenv, cpu_idx, cap_idx, idle_idx); } return 0; } /* Loading Loading @@ -5988,7 +5996,8 @@ static int compute_energy(struct energy_env *eenv) * CPUs in the current visited SG. */ eenv->sg = sg; calc_sg_energy(eenv); if (calc_sg_energy(eenv)) return -EINVAL; /* remove CPUs we have just visited */ if (!sd->child) { Loading