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

Commit 0c0790a2 authored by Shiju Mathew's avatar Shiju Mathew
Browse files

msm: thermal: Add RT priority to kernel hotplug thread



Add RT priority to KTM hotplug mitigation thread. This
is required since we have seen cases where the thread
is not scheduled fast enough during high temperature rampup
that lead to thermal runaway. So this change would make sure
the thermal hotplug mitigation thread gets high priority
and mitigate core as soon as a temperature threshold is triggered.

Change-Id: I72ecf69ede0444fe74fd9c4eaf40a12e8734326c
Signed-off-by: default avatarShiju Mathew <shijum@codeaurora.org>
parent 247909f4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2120,12 +2120,14 @@ static __ref int do_hotplug(void *data)
{
	int ret = 0;
	uint32_t cpu = 0, mask = 0;
	struct sched_param param = {.sched_priority = MAX_RT_PRIO-2};

	if (!core_control_enabled) {
		pr_debug("Core control disabled\n");
		return -EINVAL;
	}

	sched_setscheduler(current, SCHED_FIFO, &param);
	while (!kthread_should_stop()) {
		while (wait_for_completion_interruptible(
			&hotplug_notify_complete) != 0)