plugin-api: resourced: Add working set size related info in task_info 77/298377/2
authorUnsung Lee <unsung.lee@samsung.com>
Tue, 5 Sep 2023 01:59:14 +0000 (10:59 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 6 Sep 2023 23:59:28 +0000 (23:59 +0000)
resourced requires active, inactive, and swap memory size,
because working set size-based resourced-lmk-governor should know them
to calculate memory efficiency of each app.
Normally, this information is located in memory.stat of memcg.
In addition, some apps are free from LMK according to working set size.

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

index 2d3d746..e14f60a 100644 (file)
@@ -85,6 +85,13 @@ struct task_info {
        bool alpha;
        bool is_focused;
        bool is_mapped;
+
+       /* These elements are required to calculate working set size of a task */
+       unsigned long active_memory_kb;
+       unsigned long inactive_memory_kb;
+       unsigned long swap_memory_kb;
+
+       bool is_free_from_kill;
 };
 
 typedef struct _syscommon_plugin_backend_resourced_memory_lmk_funcs {