plugin-api: resourced: Pass oom level to LMK governor post for fg app 33/296333/7
authorUnsung Lee <unsung.lee@samsung.com>
Tue, 25 Jul 2023 11:21:34 +0000 (20:21 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Sun, 30 Jul 2023 04:46:33 +0000 (13:46 +0900)
LMK governor post function reordering foreground app candidates
requires oom level, so pass oom level to this post function.

Change-Id: I77b24eb298506698fdef73d8136990734eb0ef24
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk-interface.h
src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk.h
src/plugin-api/resourced/src/syscommon-plugin-resourced-memory-lmk.c

index 3b7447a203edea415a72b40ffae43907a2d92cc6..a07f0c4f203e950b70292b63f9dcdd8cb758d723 100644 (file)
@@ -38,7 +38,8 @@ typedef struct _syscommon_plugin_backend_resourced_memory_lmk_funcs {
                                unsigned long totalram_kb);
        int (*get_kill_candidates_post)(GArray *candidates);
        int (*get_kill_candidates_post_with_wss)(GArray *candidates);
-       int (*get_kill_candidates_post_with_foreground)(GArray *candidates);
+       int (*get_kill_candidates_post_with_foreground)(GArray *candidates,
+                       enum syscommon_resourced_memory_lmk_oom_level oom_level);
 } syscommon_plugin_backend_resourced_memory_lmk_funcs;
 
 #ifdef __cplusplus
index fb070aef0b9bba95c3e92cd140f769e851aad4ee..d3d5b67ddd3393fe85d3af045ae268eb91aedaa6 100644 (file)
@@ -146,7 +146,8 @@ int syscommon_plugin_resourced_memory_lmk_get_kill_candidates_post_with_wss(
  *            otherwise a negative error value
  */
 int syscommon_plugin_resourced_memory_lmk_get_kill_candidates_post_with_foreground(
-               GArray *candidates);
+               GArray *candidates,
+               enum syscommon_resourced_memory_lmk_oom_level oom_level);
 
 #ifdef __cplusplus
 }
index 205e975b3e19d778b918b72d895de1263a91c353..431625a0f89e89a4ac2d1dbebf0b4f67ebae4de4 100644 (file)
@@ -150,7 +150,8 @@ int syscommon_plugin_resourced_memory_lmk_get_kill_candidates_post_with_wss(
 
 EXPORT
 int syscommon_plugin_resourced_memory_lmk_get_kill_candidates_post_with_foreground(
-               GArray *candidates)
+               GArray *candidates,
+               enum syscommon_resourced_memory_lmk_oom_level oom_level)
 {
        int ret = 0;
 
@@ -166,5 +167,5 @@ int syscommon_plugin_resourced_memory_lmk_get_kill_candidates_post_with_foregrou
                return -ENOTSUP;
        }
 
-       return funcs->get_kill_candidates_post_with_foreground(candidates);
+       return funcs->get_kill_candidates_post_with_foreground(candidates, oom_level);
 }