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

Commit 0b24708f authored by Vikram Mulukutla's avatar Vikram Mulukutla Committed by Jonathan Avila
Browse files

sched: Add schedutil snapshot



This snapshot is taken from msm-4.14 as of commit 4b54d9aab0f1c939eec1
(Merge "net: qrtr: Handle IPCR control port format of older targets").

Change-Id: Ib66005e34e57707882e3139265c9866df306e741
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
[avilaj@codeaurora.org: Fix merge conflicts in porting.]
Signed-off-by: default avatarJonathan Avila <avilaj@codeaurora.org>
parent 67e2edcf
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -123,6 +123,15 @@ static bool sugov_should_update_freq(struct sugov_policy *sg_policy, u64 time)
	return delta_ns >= sg_policy->min_rate_limit_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 bool sugov_up_down_rate_limit(struct sugov_policy *sg_policy, u64 time,
				     unsigned int next_freq)
{
@@ -178,6 +187,7 @@ static void sugov_deferred_update(struct sugov_policy *sg_policy, u64 time,
	if (!sugov_update_next_freq(sg_policy, time, next_freq))
		return;

	if (use_pelt())
		sg_policy->work_in_progress = true;
	irq_work_queue(&sg_policy->irq_work);
}
@@ -753,6 +763,7 @@ static void sugov_work(struct kthread_work *work)
	 */
	raw_spin_lock_irqsave(&sg_policy->update_lock, flags);
	freq = sg_policy->next_freq;
	if (use_pelt())
		sg_policy->work_in_progress = false;
	sugov_track_cycles(sg_policy, sg_policy->policy->cur,
			   ktime_get_ns());
+2 −2
Original line number Diff line number Diff line
@@ -2559,7 +2559,7 @@ static inline void cpufreq_update_util(struct rq *rq, unsigned int flags)
	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, sched_ktime_clock(), flags);
}
#else
static inline void cpufreq_update_util(struct rq *rq, unsigned int flags) {}