lowmem: Restore default value of LmkThresholdLeave and LmkMaxVictimPerOom 01/303601/1
authorUnsung Lee <unsung.lee@samsung.com>
Tue, 21 Nov 2023 11:42:41 +0000 (20:42 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Tue, 2 Jan 2024 08:45:56 +0000 (17:45 +0900)
Set default value of LmkThresholdLeave and LmkMaxVictimPerOom as before
of commit 3b936616d4a2b9e4058ff191c396aebc5f5efc57

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

index 3eb9b4c..73aaef3 100644 (file)
@@ -3,8 +3,8 @@ MediumLevel=       25%
 LowLevel=          15%
 CriticalLevel=     10%
 OomLevel=           7%
-LmkThresholdLeave= 14%
-LmkMaxVictimPerOom= 10
+#LmkThresholdLeave= 14%
+#LmkMaxVictimPerOom= 10
 OomPopup=           no
 
 [MemoryAppTypeLimit]
index 72fd233..e3af6fe 100644 (file)
@@ -1600,6 +1600,8 @@ static void load_configs(void)
                                        calculate_threshold_size(memcg_conf->threshold[lvl].threshold));
 
                        if (lvl == MEM_LEVEL_OOM) {
+                               memcg_set_leave_threshold(MEMCG_ROOT,
+                                               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;
                        }
@@ -1609,6 +1611,8 @@ static void load_configs(void)
                                        memcg_conf->threshold[lvl].threshold);
 
                        if (lvl == MEM_LEVEL_OOM) {
+                               memcg_set_leave_threshold(MEMCG_ROOT,
+                                               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;
                        }