Bug fix: parsing memcg threshold 07/247507/2 accepted/tizen/unified/20201113.130840 submit/tizen/20201111.094630
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 11 Nov 2020 09:13:41 +0000 (18:13 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 11 Nov 2020 09:45:10 +0000 (09:45 +0000)
Change-Id: I670abe3b9d38f3f7a6ce9c6546e4f2d175c5bb0a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/memory/memory.conf
src/memory/vmpressure-lowmem-handler.c

index cc720df..a30c6af 100644 (file)
@@ -163,7 +163,7 @@ ThresholdLeave=300          # MB
 # Number of max victims
 NumMaxVictims=10
 
-[MEMORY3072]
+[Memory3072]
 # Threshold to start dedup
 ThresholdDedup=600        # MB
 
index c1b10a6..6e814dd 100644 (file)
@@ -1642,7 +1642,7 @@ static void setup_memcg_params(void)
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_LOW, MEMCG_MEMORY_64_THRES_LOW);
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_MEDIUM, MEMCG_MEMORY_64_THRES_MEDIUM);
                lowmem_memcg_set_leave_threshold(MEMCG_MEMORY, MEMCG_MEMORY_64_THRES_LEAVE);
-               section = "MEMORY64";
+               section = "Memory64";
        } else if (total_ramsize <= MEM_SIZE_256) {
                /* set thresholds for ram size 256M */
                proactive_threshold = PROACTIVE_256_THRES;
@@ -1652,7 +1652,7 @@ static void setup_memcg_params(void)
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_LOW, MEMCG_MEMORY_256_THRES_LOW);
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_MEDIUM, MEMCG_MEMORY_256_THRES_MEDIUM);
                lowmem_memcg_set_leave_threshold(MEMCG_MEMORY, MEMCG_MEMORY_256_THRES_LEAVE);
-               section = "MEMORY256";
+               section = "Memory256";
        } else if (total_ramsize <= MEM_SIZE_448) {
                /* set thresholds for ram size 448M */
                proactive_threshold = PROACTIVE_448_THRES;
@@ -1662,7 +1662,7 @@ static void setup_memcg_params(void)
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_LOW, MEMCG_MEMORY_448_THRES_LOW);
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_MEDIUM, MEMCG_MEMORY_448_THRES_MEDIUM);
                lowmem_memcg_set_leave_threshold(MEMCG_MEMORY, MEMCG_MEMORY_448_THRES_LEAVE);
-               section = "MEMORY448";
+               section = "Memory448";
        } else if (total_ramsize <= MEM_SIZE_512) {
                /* set thresholds for ram size 512M */
                proactive_threshold = PROACTIVE_512_THRES;
@@ -1672,7 +1672,7 @@ static void setup_memcg_params(void)
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_LOW, MEMCG_MEMORY_512_THRES_LOW);
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_MEDIUM, MEMCG_MEMORY_512_THRES_MEDIUM);
                lowmem_memcg_set_leave_threshold(MEMCG_MEMORY, MEMCG_MEMORY_512_THRES_LEAVE);
-               section = "MEMORY512";
+               section = "Memory512";
        }  else if (total_ramsize <= MEM_SIZE_768) {
                /* set thresholds for ram size 512M */
                proactive_threshold = PROACTIVE_768_THRES;
@@ -1682,7 +1682,7 @@ static void setup_memcg_params(void)
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_LOW, MEMCG_MEMORY_768_THRES_LOW);
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_MEDIUM, MEMCG_MEMORY_768_THRES_MEDIUM);
                lowmem_memcg_set_leave_threshold(MEMCG_MEMORY, MEMCG_MEMORY_768_THRES_LEAVE);
-               section = "MEMORY768";
+               section = "Memory768";
        } else if (total_ramsize <= MEM_SIZE_1024) {
                /* set thresholds for ram size more than 1G */
                proactive_threshold = PROACTIVE_1024_THRES;
@@ -1692,7 +1692,7 @@ static void setup_memcg_params(void)
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_LOW, MEMCG_MEMORY_1024_THRES_LOW);
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_MEDIUM, MEMCG_MEMORY_1024_THRES_MEDIUM);
                lowmem_memcg_set_leave_threshold(MEMCG_MEMORY, MEMCG_MEMORY_1024_THRES_LEAVE);
-               section = "MEMORY1024";
+               section = "Memory1024";
        } else if (total_ramsize <= MEM_SIZE_2048) {
                proactive_threshold = PROACTIVE_2048_THRES;
                proactive_leave = PROACTIVE_2048_LEAVE;
@@ -1701,7 +1701,7 @@ static void setup_memcg_params(void)
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_LOW, MEMCG_MEMORY_2048_THRES_LOW);
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_MEDIUM, MEMCG_MEMORY_2048_THRES_MEDIUM);
                lowmem_memcg_set_leave_threshold(MEMCG_MEMORY, MEMCG_MEMORY_2048_THRES_LEAVE);
-               section = "MEMORY2048";
+               section = "Memory2048";
        } else {
                proactive_threshold = PROACTIVE_3072_THRES;
                proactive_leave = PROACTIVE_3072_LEAVE;
@@ -1710,7 +1710,7 @@ static void setup_memcg_params(void)
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_LOW, MEMCG_MEMORY_3072_THRES_LOW);
                lowmem_memcg_set_threshold(MEMCG_MEMORY, LOWMEM_MEDIUM, MEMCG_MEMORY_3072_THRES_MEDIUM);
                lowmem_memcg_set_leave_threshold(MEMCG_MEMORY, MEMCG_MEMORY_3072_THRES_LEAVE);
-               section = "MEMORY3072";
+               section = "Memory3072";
        }
 
        config_parse(MEM_CONF_FILE, memory_load_config, (void *)section);