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

Commit 3ca1fe3a authored by Shiju Mathew's avatar Shiju Mathew
Browse files

msm: thermal: Remove D tasks in kernel thermal monitor



Remove D tasks in kernel thermal monitor by moving
wait completion to its interruptible counterpart.
This will reduce the loadavg by 50 percent.

CRs-Fixed: 654474
Change-Id: I5fc82d83170b46393ac66ca354627341fc4b5296
Signed-off-by: default avatarShiju Mathew <shijum@codeaurora.org>
parent a8816441
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -1386,7 +1386,9 @@ static __ref int do_hotplug(void *data)
	}

	while (!kthread_should_stop()) {
		wait_for_completion(&hotplug_notify_complete);
		while (wait_for_completion_interruptible(
			&hotplug_notify_complete) != 0)
			;
		INIT_COMPLETION(hotplug_notify_complete);
		mask = 0;

@@ -1933,7 +1935,9 @@ static __ref int do_freq_mitigation(void *data)
	uint32_t cpu = 0, max_freq_req = 0, min_freq_req = 0;

	while (!kthread_should_stop()) {
		wait_for_completion(&freq_mitigation_complete);
		while (wait_for_completion_interruptible(
			&freq_mitigation_complete) != 0)
			;
		INIT_COMPLETION(freq_mitigation_complete);

		get_online_cpus();
@@ -2332,7 +2336,9 @@ static __ref int do_thermal_monitor(void *data)
	struct therm_threshold *sensor_list;

	while (!kthread_should_stop()) {
		wait_for_completion(&thermal_monitor_complete);
		while (wait_for_completion_interruptible(
			&thermal_monitor_complete) != 0)
			;
		INIT_COMPLETION(thermal_monitor_complete);

		for (i = 0; i < MSM_LIST_MAX_NR; i++) {