lowmem-limit: Update app (w/ MemLimitAction) cgroup when status is changed 04/303604/1
authorUnsung Lee <unsung.lee@samsung.com>
Sun, 3 Dec 2023 10:53:59 +0000 (19:53 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Tue, 2 Jan 2024 08:46:18 +0000 (17:46 +0900)
Update memory cgroup of MemLimitAction defined app when status is changed.

Change-Id: Ia1211b1c1982c25e8adf7910cee894bfb98a6cf7
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/resource-limiter/memory/lowmem-limit.c

index 0296611..ec9c9b0 100644 (file)
@@ -591,7 +591,7 @@ static int lowmem_limit_service(void *data)
                return RESOURCED_ERROR_INVALID_PARAMETER;
 
        if (ps->pai->memory.memlimit_update_exclude)
-               return RESOURCED_ERROR_NONE;
+               return lowmem_limit_move_cgroup(ps->pai);
 
        if (mem_service_limit_bytes && mem_service_action != PROC_ACTION_IGNORE) {
                lowmem_limit_set_app(mem_service_limit_bytes, ps->pai, mem_service_action);
@@ -611,7 +611,7 @@ static int lowmem_limit_appwidget(void *data)
                return RESOURCED_ERROR_INVALID_PARAMETER;
 
        if (ps->pai->memory.memlimit_update_exclude)
-               return RESOURCED_ERROR_NONE;
+               return lowmem_limit_move_cgroup(ps->pai);
 
        if (mem_guiapp_limit_bytes && mem_guiapp_action != PROC_ACTION_IGNORE &&
            ps->pai->type == PROC_TYPE_GUI) {
@@ -641,7 +641,7 @@ static int lowmem_limit_bgapp(void *data)
                return RESOURCED_ERROR_INVALID_PARAMETER;
 
        if (ps->pai->memory.memlimit_update_exclude)
-               return RESOURCED_ERROR_NONE;
+               return lowmem_limit_move_cgroup(ps->pai);
 
        lowmem_limit_set_app(mem_bgapp_limit_bytes, ps->pai, mem_bgapp_action);