From: Unsung Lee Date: Tue, 21 Nov 2023 11:42:41 +0000 (+0900) Subject: lowmem: Restore default value of LmkThresholdLeave and LmkMaxVictimPerOom X-Git-Tag: accepted/tizen/8.0/unified/20240102.165105~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F56%2F302756%2F3;p=platform%2Fcore%2Fsystem%2Fresourced.git lowmem: Restore default value of LmkThresholdLeave and LmkMaxVictimPerOom Set default value of LmkThresholdLeave and LmkMaxVictimPerOom as before of commit 3b936616d4a2b9e4058ff191c396aebc5f5efc57 Change-Id: I487117ca976b9ab57240385f889f992b67faec75 Signed-off-by: Unsung Lee --- diff --git a/conf/limiter.conf b/conf/limiter.conf index 3eb9b4c..73aaef3 100644 --- a/conf/limiter.conf +++ b/conf/limiter.conf @@ -3,8 +3,8 @@ MediumLevel= 25% LowLevel= 15% CriticalLevel= 10% OomLevel= 7% -LmkThresholdLeave= 14% -LmkMaxVictimPerOom= 10 +#LmkThresholdLeave= 14% +#LmkMaxVictimPerOom= 10 OomPopup= no [MemoryAppTypeLimit] diff --git a/src/resource-limiter/memory/lowmem.c b/src/resource-limiter/memory/lowmem.c index 72fd233..e3af6fe 100644 --- a/src/resource-limiter/memory/lowmem.c +++ b/src/resource-limiter/memory/lowmem.c @@ -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; }