plugin-api: resourced: Add is_cpu_busy argument into govenor func 51/298251/2 accepted/tizen/unified/20230906.014630
authorUnsung Lee <unsung.lee@samsung.com>
Mon, 4 Sep 2023 06:36:47 +0000 (15:36 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Mon, 4 Sep 2023 08:57:14 +0000 (17:57 +0900)
Add is_cpu_busy argument into
syscommon_plugin_resourced_cpu_boosting_governor_govern_request() function
to check whether system cpu is busy or not.
If system cpu is not busy, then resourced cpu boosting will ignore stall event
immediately.

Function called cpu boosting governor is modified:
  - 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, bool *is_cpu_busy);
     * output argument called is_cpu_busy is added.

Change-Id: I0827f4b5ac5ffec8c64f34c124e89176e24a6c3c
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/plugin-api/resourced/include/system/syscommon-plugin-resourced-cpu-boosting-interface.h
src/plugin-api/resourced/include/system/syscommon-plugin-resourced-cpu-boosting.h
src/plugin-api/resourced/src/syscommon-plugin-resourced-cpu-boosting.c

index 73c0c40..72fefd0 100644 (file)
@@ -52,7 +52,7 @@ typedef struct _syscommon_plugin_backend_resourced_cpu_boosting_funcs {
        int (*cpu_boosting_governor_govern_request) (
                        GHashTable *cpu_boosting_info_table,
                        cpu_boosting_level_e cpu_boosting_level,
-                       GSList **cpu_boosting_controller_action);
+                       GSList **cpu_boosting_controller_action, bool *is_cpu_busy);
        bool (*is_cpu_contention_alleviated)
                (guint timer_id, guint latest_timer_id);
 } syscommon_plugin_backend_resourced_cpu_boosting_funcs;
index 598ccbd..e337bd8 100644 (file)
@@ -52,13 +52,14 @@ int syscommon_plugin_resourced_cpu_boosting_put_backend(void);
  *            CPU_BOOSTING_LEVEL_MEDIUM, and CPU_BOOSTING_LEVEL_WEAK
  * @param[out] cpu_boosting_controller_action is a GSList containing actions
  *             to be taken by cpu boosting controller
+ * @param[out] is_cpu_busy is a bool info whehter system cpu is busy or not
  * @return @c zero on success,
  *            otherwise a negative error value
  */
 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);
+               GSList **cpu_boosting_controller_action, bool *is_cpu_busy);
 
 /**
  * @brief Check whehter cpu contention is alleviated
index 4d6739b..79bbe5c 100644 (file)
@@ -82,7 +82,7 @@ EXPORT
 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)
+               GSList **cpu_boosting_controller_action, bool *is_cpu_busy)
 
 {
        int ret = 0;
@@ -100,7 +100,8 @@ int syscommon_plugin_resourced_cpu_boosting_governor_govern_request(
        }
 
        return funcs->cpu_boosting_governor_govern_request(cpu_boosting_info_table,
-                       cpu_boosting_level, cpu_boosting_controller_action);
+                       cpu_boosting_level, cpu_boosting_controller_action,
+                       is_cpu_busy);
 }
 
 EXPORT