Execute cpu boosting governor in plugin backend to govern cpu contention.
The prototype of governor function is like below:
- int syscommon_plugin_resourced_cpu_boosting_governor_govern_request
(GHashTable *cpu_boosting_info_table,
cpu_boosting_level_e cpu_boosting_level,
GSList **cpu_boosting_controller_action);
* This function receives cpu_boosting_info_table and cpu_boosting_level
as inputs and gives cpu_boosting_controller_action as an output.
If return value of this function is not 0,
then cpu_boosting_controller_action is meaningless.
Change-Id: I6c8d805b63e258147932fb7ce8928001ef715ca8
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
static gboolean cpu_boosting_governor_govern_request (gpointer user_data)
{
- return FALSE;
+ GSList *action_list = NULL;
+ int ret;
+
+ for (cpu_boosting_level_e cpu_boosting_level = CPU_BOOSTING_LEVEL_STRONG;
+ cpu_boosting_level < CPU_BOOSTING_LEVEL_END; cpu_boosting_level++) {
+ ret = syscommon_plugin_resourced_cpu_boosting_governor_govern_request(
+ g_cpu_boosting_info_table[cpu_boosting_level],
+ cpu_boosting_level, &action_list);
+ if (ret < 0)
+ return G_SOURCE_REMOVE;
+ }
+
+ if (action_list == NULL)
+ return G_SOURCE_REMOVE;
+
+ return G_SOURCE_REMOVE;
}
void cpu_boosting_wakeup_cpu_boosting_thread(void)