Check cpu stall handler is turned on.
If so, wake up cpu boosting thread to handle cpu stall.
If not, ignore event from the cpu boosting monitor.
Change-Id: Idc14a3804200291a6c4e9d021e590e98ba199e56
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
static struct cpu_affinity_conf *cpu_affinity_conf = NULL;
static struct cpu_throttling_conf *cpu_throttling_conf = NULL;
static struct cpu_boosting_conf *cpu_boosting_conf[CPU_BOOSTING_LEVEL_END] = {NULL, };
+static bool cpu_boosting_cpu_stall_handler_enabled = false;
+
+void cpu_boosting_enable_cpu_stall_handler(void)
+{
+ cpu_boosting_cpu_stall_handler_enabled = true;
+}
+
+bool cpu_boosting_is_enabled_of_cpu_stall_handler(void)
+{
+ return cpu_boosting_cpu_stall_handler_enabled;
+}
struct cpu_sched_conf *get_cpu_sched_conf(void)
{
struct cpu_sched_info cpu_sched_info;
};
+void cpu_boosting_enable_cpu_stall_handler(void);
+bool cpu_boosting_is_enabled_of_cpu_stall_handler(void);
+
+
struct cpu_sched_conf *get_cpu_sched_conf(void);
void free_cpu_sched_conf(void);
* so, the monitor should wakeup the cpu boosting main thread
* to call governor.
*/
- g_main_context_invoke(cpu_boosting_context,
- cpu_boosting_governor_govern_request, NULL);
+ if (cpu_boosting_is_enabled_of_cpu_stall_handler())
+ g_main_context_invoke(cpu_boosting_context,
+ cpu_boosting_governor_govern_request, NULL);
+ else
+ _I("[CPU-BOOSTING] CPU stall handler is turned off");
}
static cpu_boosting_level_e cpu_boosting_level_search(struct sched_attr attr)