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

Commit 5ae6c563 authored by Sridhar Ancha's avatar Sridhar Ancha
Browse files

msm: ipa: Fix queuing the inactive timer work on perf cluster



Using schedule_delayed_work will cause work queues to be scheduled
on the CPU where the timer expires. This can make work to be scheduled
on perf cluster resulting in power issues. Make changes to use
queue_delayed_work on an unbound workqueue so that the work gets
scheduled based on the load and mostly it gets scheduled in power
cluster.

Change-Id: I13605eea5fb3e7eeece1d8c81334981ea7de9cb9
Acked-by: default avatarChaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: default avatarSridhar Ancha <sancha@codeaurora.org>
parent 450bd44d
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -78,7 +78,7 @@ static void ipa_rm_inactivity_timer_func(struct work_struct *work)
	if (ipa_rm_it_handles[me->resource_name].reschedule_work) {
	if (ipa_rm_it_handles[me->resource_name].reschedule_work) {
		IPA_RM_DBG_LOW("%s: setting delayed work\n", __func__);
		IPA_RM_DBG_LOW("%s: setting delayed work\n", __func__);
		ipa_rm_it_handles[me->resource_name].reschedule_work = false;
		ipa_rm_it_handles[me->resource_name].reschedule_work = false;
		schedule_delayed_work(
		queue_delayed_work(system_unbound_wq,
			&ipa_rm_it_handles[me->resource_name].work,
			&ipa_rm_it_handles[me->resource_name].work,
			ipa_rm_it_handles[me->resource_name].jiffies);
			ipa_rm_it_handles[me->resource_name].jiffies);
	} else if (ipa_rm_it_handles[me->resource_name].resource_requested) {
	} else if (ipa_rm_it_handles[me->resource_name].resource_requested) {
@@ -262,7 +262,8 @@ int ipa_rm_inactivity_timer_release_resource(
	ipa_rm_it_handles[resource_name].work_in_progress = true;
	ipa_rm_it_handles[resource_name].work_in_progress = true;
	ipa_rm_it_handles[resource_name].reschedule_work = false;
	ipa_rm_it_handles[resource_name].reschedule_work = false;
	IPA_RM_DBG_LOW("%s: setting delayed work\n", __func__);
	IPA_RM_DBG_LOW("%s: setting delayed work\n", __func__);
	schedule_delayed_work(&ipa_rm_it_handles[resource_name].work,
	queue_delayed_work(system_unbound_wq,
			      &ipa_rm_it_handles[resource_name].work,
			      ipa_rm_it_handles[resource_name].jiffies);
			      ipa_rm_it_handles[resource_name].jiffies);
	spin_unlock_irqrestore(&ipa_rm_it_handles[resource_name].lock, flags);
	spin_unlock_irqrestore(&ipa_rm_it_handles[resource_name].lock, flags);