summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorJunjie Wu <junjiew@codeaurora.org>2016-01-05 11:09:41 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:25:27 -0700
commita81be0508668e4a7c044cb34e1188abeed28b158 (patch)
tree6d35c203b8a8fd1b70e0ee68ad4efb5777d24d1d /drivers/cpufreq
parent56c4d59fc81e00661c3c040c4a57355812d9e566 (diff)
cpufreq: interactive: Use wake_up_process_no_notif to wake up tasks
Scheduler could send a notification to governor each time a task wakes up. If governor wakes up another task as a response to such a notification, it could result in endless recursive notifications. Use wake_up_process_no_notif to ensure scheduler won't send another notification for speedchange task woken up by the governor. Change-Id: I697affcbdf79e2ad0cfe843eb880d304960682f4 Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq_interactive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index a0ab8e1d34ca..334a280eb37d 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -648,7 +648,7 @@ static void cpufreq_interactive_timer(unsigned long data)
spin_lock_irqsave(&speedchange_cpumask_lock, flags);
cpumask_set_cpu(max_cpu, &speedchange_cpumask);
spin_unlock_irqrestore(&speedchange_cpumask_lock, flags);
- wake_up_process(speedchange_task);
+ wake_up_process_no_notif(speedchange_task);
rearm:
if (!timer_pending(&ppol->policy_timer))
@@ -764,7 +764,7 @@ static void cpufreq_interactive_boost(struct cpufreq_interactive_tunables *tunab
spin_unlock_irqrestore(&speedchange_cpumask_lock, flags[0]);
if (anyboost)
- wake_up_process(speedchange_task);
+ wake_up_process_no_notif(speedchange_task);
}
static int load_change_callback(struct notifier_block *nb, unsigned long val,
@@ -1791,7 +1791,7 @@ static int __init cpufreq_interactive_init(void)
get_task_struct(speedchange_task);
/* NB: wake up so the thread does not look hung to the freezer */
- wake_up_process(speedchange_task);
+ wake_up_process_no_notif(speedchange_task);
return cpufreq_register_governor(&cpufreq_gov_interactive);
}