resourced-cpu-boosting: Add cpu boosting governor
Add cpu boosting governor in resourced plugin backend to govern
boosted thread. This function is called when CPU PSIs are triggered in resourced.
That is, cpu contention is detected in the resourced.
cpu boosting governor figures out the reason of cpu contention, and
make a list actions to handle cpu contention in cpu boosting controller.
The rule of cpu boosting governor is like below:
- Decrease cpu boosting level of all threads having CPU_BOOSTING_LEVEL_STRONG.
(CPU_BOOSTING_LEVEL_STRONG -> CPU_BOOSTING_LEVEL_MEDIUM)
- Decrease cpu boosting level of all threads having CPU_BOOSTING_LEVEL_MEDIUM
when there is no thread having CPU_BOOSTING_LEVEL_STRONG.
(CPU_BOOSTING_LEVEL_MEDIUM -> CPU_BOOSTING_LEVEL_WEAK)
A new function called cpu boosting governor is added:
- int cpu_boosting_governor_govern_request
(const 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: Ie86c123b6b0f78a2f64857877677b822eda45130
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>