diff options
author | Unsung Lee <unsung.lee@samsung.com> | 2023-11-30 17:19:12 +0900 |
---|---|---|
committer | Unsung Lee <unsung.lee@samsung.com> | 2024-01-02 17:46:56 +0900 |
commit | 0f1f78456ba6162ce0165f5d3d4a90416fc945b5 (patch) | |
tree | 8c4c41bec26e407acaf0406c8834996cb13fbaf4 | |
parent | 0de23b8c4de5768cbafdfeb066281deeb1987d48 (diff) | |
download | resourced-accepted/tizen_unified_riscv.tar.gz resourced-accepted/tizen_unified_riscv.tar.bz2 resourced-accepted/tizen_unified_riscv.zip |
cpu-sched: Exclude apps that are not foreground but have PROC_STATE_FOREGROUND stateaccepted/tizen/unified/riscv/20240103.054535accepted/tizen/unified/20240105.013014accepted/tizen/unified/20240104.012423accepted/tizen_unified_riscv
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.c | 4 |
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); } } |