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

Commit 47f2b460 authored by Shaleen Agrawal's avatar Shaleen Agrawal
Browse files

sched: Cleanup allowed cpus in task placement



Cleanup a redundancy while checking for affinity.

Change-Id: I36b6c2f3c8e1067cb6e09f0d5fb60e9e33a4d342
Signed-off-by: default avatarShaleen Agrawal <shalagra@codeaurora.org>
parent 1e4aef37
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))