summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnsung Lee <unsung.lee@samsung.com>2023-11-30 17:19:12 +0900
committerUnsung Lee <unsung.lee@samsung.com>2024-01-02 17:46:56 +0900
commit0f1f78456ba6162ce0165f5d3d4a90416fc945b5 (patch)
tree8c4c41bec26e407acaf0406c8834996cb13fbaf4
parent0de23b8c4de5768cbafdfeb066281deeb1987d48 (diff)
downloadresourced-accepted/tizen_unified_riscv.tar.gz
resourced-accepted/tizen_unified_riscv.tar.bz2
resourced-accepted/tizen_unified_riscv.zip
Exclude apps that are not foreground but have PROC_STATE_FOREGROUND state from foreground cpu affinity group. cpu-sched module initially searches already launched foreground app and move them to foreground cpu affinity grouop. Change-Id: I3692d6a4e70c08babc5547326133099ac20ebf91 Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
-rw-r--r--src/resource-optimizer/cpu/cpu-sched.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resource-optimizer/cpu/cpu-sched.c b/src/resource-optimizer/cpu/cpu-sched.c
index a5e52088..968fd89d 100644
--- a/src/resource-optimizer/cpu/cpu-sched.c
+++ b/src/resource-optimizer/cpu/cpu-sched.c
@@ -12,6 +12,7 @@
#include "cpu-cgroup.h"
#include "cpu-common.h"
#include "util.h"
+#include "procfs.h"
#define MOUNTS_PATH "/proc/mounts"
#define CPUSET_CGROUP "/sys/fs/cgroup/cpuset"
@@ -658,7 +659,8 @@ static void cpu_sched_check_apps()
continue;
}
- if (cs.fg && pai->state == PROC_STATE_FOREGROUND)
+ if (cs.fg && pai->state == PROC_STATE_FOREGROUND &&
+ pai->memory.oom_score_adj < OOMADJ_BACKGRD_LOCKED)
cpu_sched_add_pid_to_cpuset(cs.fg, pai->main_pid);
}
}