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

Commit 31f38cb5 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: Cleanup allowed cpus in task placement"

parents e9ea0709 47f2b460
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -6561,6 +6561,7 @@ static void walt_find_best_target(struct sched_domain *sd, cpumask_t *cpus,
	int cluster;
	unsigned int target_nr_rtg_high_prio = UINT_MAX;
	bool rtg_high_prio_task = task_rtg_high_prio(p);
	cpumask_t visit_cpus;

	/* Find start CPU based on boost value */
	start_cpu = fbt_env->start_cpu;
@@ -6586,17 +6587,14 @@ static void walt_find_best_target(struct sched_domain *sd, cpumask_t *cpus,
		}
	}
	for (cluster = 0; cluster < num_sched_clusters; cluster++) {

		for_each_cpu_and(i, &p->cpus_mask,
				&cpu_array[order_index][cluster]) {
		cpumask_and(&visit_cpus, &p->cpus_mask,
				&cpu_array[order_index][cluster]);
		for_each_cpu(i, &visit_cpus) {
			unsigned long capacity_orig = capacity_orig_of(i);
			unsigned long wake_util, new_util, new_util_cuml;
			long spare_cap;
			int idle_idx = INT_MAX;

			if (!cpumask_test_cpu(i, &p->cpus_mask))
				continue;

			trace_sched_cpu_util(i);

			if (!cpu_active(i) || cpu_isolated(i))