proc-oom-priority: Change minimum fixed oom score 16/315816/5
authorUnsung Lee <unsung.lee@samsung.com>
Thu, 8 Aug 2024 04:45:38 +0000 (13:45 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Thu, 8 Aug 2024 07:41:31 +0000 (16:41 +0900)
Change minimum fixed oom score to reflect real
minimum fixed oom score configuration "OomScore".
The resourced does not allow OomScore in app structure less than zero.

Change-Id: Ib8ce14bc5cf8310c46bae47ef54b7d59d3f2c95f
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
conf/README
src/process/proc-oom-priority.c

index fed421808b9d1f2a296cd7251778b5248204bf99..919d2a02c9dc21db09de8572948610cd57e76f6e 100644 (file)
@@ -646,10 +646,9 @@ Example: WatchdogAction=ignore
 Key: OomScore
 Value: <oom_score_adj>
 Comment: Specify the fixed oom_score_adj.
-         oom_score_adj is an integer value between -900 to 250.
+         oom_score_adj is an integer value between 0 to 250.
          Predefined values cannot be used.
          Predefined values:
-                 -900 : The lowest oom score value in resourced.
                  0    : Initial value for services and processes.
                  100  : Initial value for apps.
                  150  : Foreground status when it is cpu-locked(prevents sleep).
index efa1443acc2f27041d1c8b892a5e4d38ae20b4cd..28bf2b83201f0b3ed3d7750457cdeec4feed48be 100644 (file)
@@ -31,7 +31,7 @@
 #include "resourced.h"
 #include "trace.h"
 
-#define FIXED_OOM_MIN          OOMADJ_SERVICE_MIN
+#define FIXED_OOM_MIN          OOMADJ_SU
 #define FIXED_OOM_MAX          OOMADJ_BACKGRD_LOCKED
 
 static GHashTable *oom_fixed_pid_list;
@@ -48,7 +48,6 @@ static bool is_wrong_oom_score(int oom_score, const char *name)
         * However, it reduces resourced user experience considerably.
         */
        switch (oom_score) {
-       case OOMADJ_SERVICE_MIN:
        case OOMADJ_SU:
        case OOMADJ_INIT:
        case OOMADJ_FOREGRD_LOCKED: