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

Commit 80bb9184 authored by Puja Gupta's avatar Puja Gupta
Browse files

sched/walt: Introduce SCHED_CPUFREQ_CONTINUE for schedutil



Introduce a flag for schedutil to know when cpufreq_update_util() is
called for last cpu in the cluster. This is required so that schedutil
can do only one frequency update for the entire cluster.

Change-Id: I2457b83bca58fdbf5f6c6c0b5eb656204b1d2601
Signed-off-by: default avatarPuja Gupta <pujag@codeaurora.org>
parent be49c613
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#define SCHED_CPUFREQ_WALT (1U << 4)
#define SCHED_CPUFREQ_PL	(1U << 5)
#define SCHED_CPUFREQ_EARLY_DET (1U << 6)
#define SCHED_CPUFREQ_CONTINUE (1U << 7)

#define SCHED_CPUFREQ_RT_DL	(SCHED_CPUFREQ_RT | SCHED_CPUFREQ_DL)

+12 −3
Original line number Diff line number Diff line
@@ -3082,9 +3082,18 @@ void walt_irq_work(struct irq_work *irq_work)
		raw_spin_unlock(&cluster->load_lock);
	}

	for_each_sched_cluster(cluster)
		for_each_cpu(cpu, &cluster->cpus)
	for_each_sched_cluster(cluster) {
		unsigned int num_cpus = cpumask_weight(&cluster->cpus), i = 1;

		for_each_cpu(cpu, &cluster->cpus) {
			if (i == num_cpus)
				cpufreq_update_util(cpu_rq(cpu), flag);
			else
				cpufreq_update_util(cpu_rq(cpu), flag |
							SCHED_CPUFREQ_CONTINUE);
			i++;
		}
	}

	for_each_cpu(cpu, cpu_possible_mask)
		raw_spin_unlock(&cpu_rq(cpu)->lock);