aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunjie Wu <junjiew@codeaurora.org>2016-01-05 11:09:41 -0800
committerArvin Quilao <arquilao@gmail.com>2017-04-17 02:08:39 +0000
commit2a70ff1c02c7830bd6f14ebbd8052b1f326fbaae (patch)
treee58ad622bf66063385fcd488170b0640016d0138
parent560417955a685b8a78d214b281adb413c74e8865 (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>
-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 78e96521156..3403ab4c5a8 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -545,7 +545,7 @@ static void cpufreq_interactive_timer(unsigned long data)
spin_lock_irqsave(&speedchange_cpumask_lock, flags);
cpumask_set_cpu(data, &speedchange_cpumask);
spin_unlock_irqrestore(&speedchange_cpumask_lock, flags);
- wake_up_process(speedchange_task);
+ wake_up_process_no_notif(speedchange_task);
rearm_if_notmax:
/*
@@ -753,7 +753,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,
@@ -1786,7 +1786,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);
}