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

Commit 95665dbc authored by Vikram Mulukutla's avatar Vikram Mulukutla Committed by Gerrit - the friendly Code Review server
Browse files

sched: Add schedutil snapshot



This snapshot is taken from msm-4.9 as of commit 935c3e96d14c14d
(Revert "sched/fair: Limit sync wakeup bias to waker cpu").

Change-Id: Ib66005e34e57707882e3139265c9866df306e741
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent a8837753
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -125,6 +125,15 @@ static bool sugov_should_update_freq(struct sugov_policy *sg_policy, u64 time)
	return delta_ns >= sg_policy->freq_update_delay_ns;
}

static inline bool use_pelt(void)
{
#ifdef CONFIG_SCHED_WALT
	return (!sysctl_sched_use_walt_cpu_util || walt_disabled);
#else
	return true;
#endif
}

static void sugov_update_commit(struct sugov_policy *sg_policy, u64 time,
				unsigned int next_freq)
{
@@ -144,6 +153,7 @@ static void sugov_update_commit(struct sugov_policy *sg_policy, u64 time,
		policy->cur = next_freq;
		trace_cpu_frequency(next_freq, smp_processor_id());
	} else {
		if (use_pelt())
			sg_policy->work_in_progress = true;
		irq_work_queue(&sg_policy->irq_work);
	}
@@ -518,6 +528,7 @@ static void sugov_work(struct kthread_work *work)
				CPUFREQ_RELATION_L);
	mutex_unlock(&sg_policy->work_lock);

	if (use_pelt())
		sg_policy->work_in_progress = false;
}

+19 −2
Original line number Diff line number Diff line
@@ -2438,10 +2438,27 @@ static inline void cpufreq_update_util(struct rq *rq, unsigned int flags)
{
	struct update_util_data *data;

#ifdef CONFIG_SCHED_WALT
	unsigned int exception_flags = SCHED_CPUFREQ_INTERCLUSTER_MIG |
				SCHED_CPUFREQ_PL | SCHED_CPUFREQ_EARLY_DET;

	/*
	 * Skip if we've already reported, but not if this is an inter-cluster
	 * migration. Also only allow WALT update sites.
	 */
	if (!(flags & SCHED_CPUFREQ_WALT))
		return;
	if (!sched_disable_window_stats &&
		(rq->load_reported_window == rq->window_start) &&
		!(flags & exception_flags))
		return;
	rq->load_reported_window = rq->window_start;
#endif

	data = rcu_dereference_sched(*per_cpu_ptr(&cpufreq_update_util_data,
					cpu_of(rq)));
	if (data)
		data->func(data, rq_clock(rq), flags);
		data->func(data, ktime_get_ns(), flags);
}
#else
static inline void cpufreq_update_util(struct rq *rq, unsigned int flags) {}