OSDN Git Service

msm: ipa: Fix queuing the inactive timer work on perf cluster
authorSridhar Ancha <sancha@codeaurora.org>
Wed, 22 Jun 2016 09:46:52 +0000 (15:16 +0530)
committerKyle Yan <kyan@codeaurora.org>
Tue, 5 Jul 2016 22:28:23 +0000 (15:28 -0700)
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: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Sridhar Ancha <sancha@codeaurora.org>
drivers/platform/msm/ipa/ipa_rm_inactivity_timer.c

index 2f2cef0..8e33d71 100644 (file)
@@ -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) {
                IPA_RM_DBG_LOW("%s: setting delayed work\n", __func__);
                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].jiffies);
        } 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].reschedule_work = false;
        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);
        spin_unlock_irqrestore(&ipa_rm_it_handles[resource_name].lock, flags);