Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d3aee95 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: walt: Derive sched_smp_overlap_capacity from the energy-model"

parents 6bb209db 0d91facc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6819,7 +6819,7 @@ is_packing_eligible(struct task_struct *p, unsigned long task_util,
	return cpu_cap_idx_pack == cpu_cap_idx_spread;
}

static unsigned int sched_smp_overlap_capacity = SCHED_CAPACITY_SCALE;
unsigned int sched_smp_overlap_capacity = SCHED_CAPACITY_SCALE;

static int energy_aware_wake_cpu(struct task_struct *p, int target, int sync)
{
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ struct rq;
struct cpuidle_state;

extern __read_mostly bool sched_predl;
extern unsigned int sched_smp_overlap_capacity;

#ifdef CONFIG_SCHED_WALT
extern unsigned int sched_ravg_window;
+20 −2
Original line number Diff line number Diff line
@@ -2179,7 +2179,7 @@ static void sort_clusters(void)
void walt_sched_energy_populated_callback(void)
{
	struct sched_cluster *cluster;
	int prev_max = 0;
	int prev_max = 0, next_min = 0;

	mutex_lock(&cluster_lock);

@@ -2201,8 +2201,26 @@ void walt_sched_energy_populated_callback(void)
		 * clusters on a big.LITTLE system.
		 */
		sysctl_sched_is_big_little = 0;
		next_min = cluster->min_power_cost;
	}

	/*
	 * Find the OPP at which the lower power cluster
	 * power is overlapping with the next cluster.
	 */
	if (!sysctl_sched_is_big_little) {
		int cpu = cluster_first_cpu(sched_cluster[0]);
		struct sched_group_energy *sge = sge_array[cpu][SD_LEVEL1];
		int i;

		for (i = 1; i < sge->nr_cap_states; i++) {
			if (sge->cap_states[i].power >= next_min) {
				sched_smp_overlap_capacity =
						sge->cap_states[i-1].cap;
				break;
			}
		}
	}

	mutex_unlock(&cluster_lock);
}