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 73c0c407e599129f2a549b6a5521e0d5a392c4cd..72fefd0273e35b20339bcbe933ab3ba4f7e09893 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 598ccbd524d084656cb51b9e1d648c7321f33b30..e337bd8434f8d292bb60af681ee93bce51a0742b 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 4d6739ba8fa9635c6314fdaf256cc722e171977b..79bbe5cdb4995a17e2dabfcbcf4d1984a3f10c14 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