conf: update MemoryLevelThreshold, MemoryDedup, and MemoryCompaction 28/276228/2
authorUnsung Lee <unsung.lee@samsung.com>
Mon, 13 Jun 2022 07:25:01 +0000 (16:25 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Mon, 13 Jun 2022 08:03:31 +0000 (17:03 +0900)
Change-Id: I24e08743e909a94b91dc1077f3a48fa1e1664d00
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
conf/limiter.conf
conf/optimizer.conf
src/resource-limiter/memory/vmpressure-lowmem-handler.c

index b8d1c2d..bd491b6 100644 (file)
@@ -1,10 +1,9 @@
-
 [MemoryLevelThreshold]
-#MediumLevel=       20%
-#LowLevel=          15%
-#CriticalLevel=     10%
-#OomLevel=           7%
-OomPopup=            no
+MediumLevel=       25%
+LowLevel=          15%
+CriticalLevel=     10%
+OomLevel=           7%
+OomPopup=           no
 
 [MemoryAppTypeLimit]
 ServicePerAppLimitAction=128MB,kill
index 9e5ace1..d29a83b 100644 (file)
@@ -12,18 +12,18 @@ PoolRatio=40
 PoolType=z3fold
 
 [MemoryDedup]
-#DedupAtBoot=yes
-#ScanOnLowmem=yes
+DedupAtBoot=yes
+ScanOnLowmem=yes
 
 [MemoryKsm]
-#KsmMode=oneshot
-#KsmMode=periodic
+KsmMode=oneshot
+KsmMode=periodic
 
-#PagesToScan=100
-#PagesToScanWithBoost=1000
+PagesToScan=100
+PagesToScanWithBoost=1000
 
 [MemoryCompaction]
-#FragLevel=800
+FragLevel=800
 
 [CpuSched]
 #CpuSchedFeature=no_rt_runtime_share
index 8181479..89cb30c 100644 (file)
@@ -1746,17 +1746,24 @@ static void load_configs(void)
                        memcg_set_threshold(MEMCG_ROOT, lvl,
                                        calculate_threshold_size(memcg_conf->threshold[lvl].threshold));
 
-                       if (lvl == MEM_LEVEL_OOM)
+                       if (lvl == MEM_LEVEL_OOM) {
                                memcg_set_leave_threshold(MEMCG_ROOT,
-                                               get_memcg_info(MEMCG_ROOT)->threshold_mb[lvl] * 2);
+                                               get_memcg_info(MEMCG_ROOT)->threshold_mb[lvl] * 1.5);
+                               proactive_threshold_mb = get_memcg_info(MEMCG_ROOT)->threshold_leave_mb;
+                               proactive_leave_mb = proactive_threshold_mb * 1.5;
+                       }
                }
                else if (memcg_conf->threshold[lvl].threshold > 0) {
                        memcg_set_threshold(MEMCG_ROOT, lvl,
                                        memcg_conf->threshold[lvl].threshold);
 
-                       if (lvl == MEM_LEVEL_OOM)
+                       if (lvl == MEM_LEVEL_OOM) {
                                memcg_set_leave_threshold(MEMCG_ROOT,
-                                               get_memcg_info(MEMCG_ROOT)->threshold_mb[lvl] * 2);
+                                               get_memcg_info(MEMCG_ROOT)->threshold_mb[lvl] * 1.5);
+                               proactive_threshold_mb = get_memcg_info(MEMCG_ROOT)->threshold_leave_mb;
+                               proactive_leave_mb = proactive_threshold_mb * 1.5;
+                       }
+
                }
        }
        oom_popup_enable = memcg_conf->oom_popup;