memory-cgroup: Rename memory throttling to memory background LRU 88/303588/1
authorUnsung Lee <unsung.lee@samsung.com>
Thu, 17 Aug 2023 06:31:49 +0000 (15:31 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Tue, 2 Jan 2024 08:44:09 +0000 (17:44 +0900)
Rename memory throttling to memory background LRU to emphasize the meaning
of the corresponding memory cgroup.

This is one of patch to restore BackgroundReclaim configuration of resourced 6.0.

Change-Id: I7f7243d40cc1a1c9e4762bea2176d4abbbe62b1c
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
15 files changed:
conf/README
conf/limiter.conf
conf/optimizer.conf
src/common/cgroup/memory-cgroup.c
src/common/cgroup/memory-cgroup.h
src/common/conf/config-parser.c
src/common/conf/config-parser.h
src/common/conf/swap-common.c
src/common/proc-common.h
src/resource-limiter/memory/lowmem-controller.c
src/resource-limiter/memory/lowmem-dbus.c
src/resource-limiter/memory/lowmem.c
src/resource-optimizer/memory/swap/swap.c
src/resource-optimizer/memory/swap/zramswap.c
src/resourced/init.c

index 98e0e14..3f4ad12 100644 (file)
@@ -18,8 +18,8 @@ File Format
 Config file consists of two parts: section names and key-value pairs.
 Section name should be located between '[' and ']'. (ex: [MemoryLevelThreshold])
 The range of a section is: From the first appearance of section name to the EOF or the line before the next section starts
-Example: [MemoryThrottling]
-         ThrottlingLimit=80%
+Example: [MemoryBackgroundLru]
+         BackgroundLruLimit=80%
 Lines beginning with '#' are ignored.
 
 Value Format
@@ -30,12 +30,12 @@ Names enclosed with clamps(<...>) can be replaced with some value which describe
 1. limiter.conf
 ===============
 
-1.1 Section: MemoryThrottling
+1.1 Section: MemoryBackgroundLru
 =============================
-Key: ThrottlingLimit
+Key: BackgroundLruLimit
 Value: <limit ratio in percentage>%
-Comment: Specify the throttling limit ratio in percentage.
-Example: ThrottlingLimit=80%
+Comment: Specify the memory cgroup BackgroundLru limit ratio in percentage.
+Example: BackgroundLruLimit=80%
 
 1.2 Section: MemoryLevelThreshold
 =================================
@@ -172,7 +172,7 @@ Example: SwapType=zram|file
           or
          SwapType=zram+file
 
-Key: ThrottlingSwappiness=80
+Key: BackgroundLruSwappiness=80
 Value: <swappiness>
 Comment: Specify memory swappiness value.
          <swappiness> is an decimal integer value.
@@ -181,7 +181,7 @@ Comment: Specify memory swappiness value.
          (But 0 does not mean no swapping)
          If <swappiness> > 60, the tendency of the kernel of swapping process memory will be increased.
          If <swappiness> > 100, then the kernel can swap out a part of the pages in the address space in this cgroup.
-Example: ThrottlingSwappiness=80
+Example: BackgroundLruSwappiness=80
 
 2.2 Section: MemoryZram
 =======================
@@ -524,12 +524,12 @@ Comment: Specify the memory limitation of this app/service/process.
          <action> can be: broadcast, reclaim, kill, ignore
 Example: MemLimitAction=4096KB,kill
 
-Key: MemoryThrottling
+Key: MemoryBackgroundLru
 Value: (yes|1|ok|on|no|0|off)
-Comment: Specify whether the memory throttling is enabled.
-         If (yes|1|ok|on), enable memory throttling.
-         If (no|0|off), disable memory throttling.
-Example: MemoryThrottling=yes
+Comment: Specify whether put the process or service in BackgroundLru memory cgroup.
+         If (yes|1|ok|on), put the process or service in BackgroundLru.
+         If (no|0|off), do not put the process or service in BackgroundLru.
+Example: MemoryBackgroundLru=yes
 
 Key: CpuThrottling
 Value: (yes|1|ok|on|no|0|off)
index e4deba0..285e0fd 100644 (file)
@@ -13,8 +13,8 @@ ServicePerAppLimitAction=128MB,kill
 [MemoryAppStatusLimit]
 #BackgroundPerAppLimitAction=768MB,kill
 
-[MemoryThrottling]
-ThrottlingLimit=  80%
+[MemoryBackgroundLru]
+BackgroundLruLimit=  80%
 
 [MemoryLMKGovernor]
 ForegroundAppListPostGovernor=no
index 49aa6a8..c2fa7c2 100644 (file)
@@ -1,7 +1,7 @@
 [MemorySwap]
 ReclaimAtBoot=yes
 SwapType=zram
-ThrottlingSwappiness=80
+BackgroundLruSwappiness=80
 
 [MemoryZram]
 CompAlgorithm=zstd
index fa5ff21..b18d464 100644 (file)
@@ -63,12 +63,12 @@ static struct memcg_conf *memcg_conf = NULL;
  **/
 static struct cgroup cgroup_tree[MEMCG_END] = {
        {"/",                   MEMCG_TOP,  CGROUP_DEFAULT_USE_HIERARCHY, NULL},
-       {MEMCG_THROTTLING_NAME, MEMCG_ROOT, CGROUP_DEFAULT_USE_HIERARCHY, NULL},
+       {MEMCG_BACKGROUND_LRU_NAME, MEMCG_ROOT, CGROUP_DEFAULT_USE_HIERARCHY, NULL},
 };
 
 static struct memcg_info gmemcg_info[MEMCG_END] = {
        {MEMCG_PATH,},
-       {MEMCG_THROTTLING_PATH,},
+       {MEMCG_BACKGROUND_LRU_PATH,},
 };
 
 /* Check whether memsw exists or not */
@@ -91,7 +91,7 @@ bool memcg_memsw_is_supported(void)
 int memcg_get_lowest_oom_score_adj(enum cgroup_type cgroup_type, int *oom_score_adj)
 {
        switch (cgroup_type) {
-       case MEMCG_THROTTLING:
+       case MEMCG_BACKGROUND_LRU:
                *oom_score_adj = OOMADJ_BACKGRD_UNLOCKED + OOMADJ_APP_INCREASE;
                break;
        case MEMCG_ROOT:
@@ -109,7 +109,7 @@ int cgroup_get_type(int oom_score_adj)
 {
        if (oom_score_adj >= OOMADJ_BACKGRD_UNLOCKED + OOMADJ_APP_INCREASE &&
                    oom_score_adj <= OOMADJ_APP_MAX)
-               return MEMCG_THROTTLING;
+               return MEMCG_BACKGROUND_LRU;
        else
                return MEMCG_ROOT;
 }
@@ -396,7 +396,7 @@ int memcg_write_limiter_params(void)
        unsigned int i;
        unsigned long long lower_group_limit_bytes = 0;
 
-       for (i = MEMCG_THROTTLING; i > MEMCG_ROOT; i--) {
+       for (i = MEMCG_BACKGROUND_LRU; i > MEMCG_ROOT; i--) {
                struct memcg_info *mi = get_memcg_info(i);
 
                if (mi->limit_bytes < lower_group_limit_bytes)
@@ -413,7 +413,7 @@ int memcg_write_optimizer_params(void)
 {
        unsigned int i;
 
-       for (i = MEMCG_THROTTLING; i < MEMCG_END; i++) {
+       for (i = MEMCG_BACKGROUND_LRU; i < MEMCG_END; i++) {
                struct memcg_info *mi = get_memcg_info(i);
                memcg_write_optimizer_info(mi);
        }
@@ -687,9 +687,9 @@ int memcg_make_full_subdir(const char* parentdir)
 {
        int result;
 
-       result = cgroup_make_subdir(parentdir, MEMCG_MAKE_NAME(THROTTLING), NULL);
+       result = cgroup_make_subdir(parentdir, MEMCG_MAKE_NAME(BACKGROUND_LRU), NULL);
        ret_value_msg_if(result < 0, result, "%s/%s init failed\n",
-                       parentdir, MEMCG_MAKE_NAME(THROTTLING));
+                       parentdir, MEMCG_MAKE_NAME(BACKGROUND_LRU));
        result = cgroup_make_subdir(parentdir, MEMCG_MAKE_NAME(PRIVATE), NULL);
        ret_value_msg_if(result < 0, result, "%s/%s init failed\n",
                        parentdir, MEMCG_MAKE_NAME(PRIVATE));
index 91c3842..cff5127 100644 (file)
@@ -39,12 +39,12 @@ extern "C" {
 /* number of memory cgroups */
 #define MEMCG_DEFAULT_EVENT_LEVEL       "low"
 
-#define MEMCG_THROTTLING_NAME           "Throttling"
+#define MEMCG_BACKGROUND_LRU_NAME       "BackgroundLru"
 #define MEMCG_PRIVATE_NAME              "Private"
 
 #define MEMCG_NAME                                             "memory"
 #define MEMCG_PATH                      CGROUP_PATH "/" MEMCG_NAME
-#define MEMCG_THROTTLING_PATH           MEMCG_PATH "/" MEMCG_THROTTLING_NAME
+#define MEMCG_BACKGROUND_LRU_PATH       MEMCG_PATH "/" MEMCG_BACKGROUND_LRU_NAME
 #define MEMCG_PRIVATE_PATH              MEMCG_PATH "/" MEMCG_PRIVATE_NAME
 
 #define MEMCG_OOM_CONTROL               "memory.oom_control"
@@ -129,18 +129,18 @@ enum cgroup_memory_stat_id {
 /*
  * [memory cgroup information]
  * MEMCG_ROOT          : memory cgroup for root dir
- * MEMCG_THROTTLING    : memory cgroup for throttling
+ * MEMCG_BackgroundLru : memory cgroup for least recently used background app
  *
  * [memory cgroup hierarchy]
  *  (normal mode)
  *    root
- *     └─Throttling
+ *     └─BackgroundLru
  *     └─system.slice/user.slice
  */
 enum cgroup_type {
        MEMCG_TOP = -1,
        MEMCG_ROOT,
-       MEMCG_THROTTLING,
+       MEMCG_BACKGROUND_LRU,
        MEMCG_END,
 };
 
index 3747257..98f535d 100644 (file)
@@ -442,9 +442,9 @@ static int optimizer_config(struct parse_result *result, void *user_data)
                                swap_conf->swap_type = SWAP_TYPE_ZRAM;
                        }
                }
-               else if (!strncmp(result->name, THROTTLING_SWAPPINESS_NAME_CONF,
-                                       strlen(THROTTLING_SWAPPINESS_NAME_CONF)+1)) {
-                       swap_conf->swappiness[MEMCG_THROTTLING] = atoi(result->value);
+               else if (!strncmp(result->name, BACKGROUND_LRU_SWAPPINESS_NAME_CONF,
+                                       strlen(BACKGROUND_LRU_SWAPPINESS_NAME_CONF)+1)) {
+                       swap_conf->swappiness[MEMCG_BACKGROUND_LRU] = atoi(result->value);
                }
                else {
                        _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
@@ -711,8 +711,8 @@ static int limiter_config(struct parse_result *result, void *user_data)
                return RESOURCED_ERROR_FAIL;
        }
 
-       if (!strncmp(result->section, MEMORY_THROTTLING_SECTION,
-                               strlen(MEMORY_THROTTLING_SECTION)+1)) {
+       if (!strncmp(result->section, MEMORY_BACKGROUND_LRU_SECTION,
+                               strlen(MEMORY_BACKGROUND_LRU_SECTION)+1)) {
                char *ptr = strchr(result->value, '%');
                if (ptr == NULL) {
                        _E("[CONFIG] Cannot find '%%' in the string (%s)", result->value);
@@ -721,9 +721,9 @@ static int limiter_config(struct parse_result *result, void *user_data)
                else
                        *ptr = '\0';
 
-               if (!strncmp(result->name, THROTTLING_LIMIT_NAME_CONF,
-                                       strlen(THROTTLING_LIMIT_NAME_CONF) + 1)) {
-                       memcg_conf->cgroup_limit[MEMCG_THROTTLING] = atof(result->value);
+               if (!strncmp(result->name, BACKGROUND_LRU_LIMIT_NAME_CONF,
+                                       strlen(BACKGROUND_LRU_LIMIT_NAME_CONF) + 1)) {
+                       memcg_conf->cgroup_limit[MEMCG_BACKGROUND_LRU] = atof(result->value);
                }
                else {
                        _E("[CONFIG] Unknown configuration name (%s) and value (%s) on section (%s)",
@@ -978,16 +978,15 @@ static int vendor_config(struct parse_result *result, void *user_data)
                error = set_mem_action_conf(&pci->mem_action, result->value);
                return error;
        }
-       else if (!strncmp(result->name, MEMORY_THROTTLING_NAME_CONF,
-               strlen(MEMORY_THROTTLING_NAME_CONF)+1) && *config_type == LIMITER_CONFIG) {
+       else if (!strncmp(result->name, MEMORY_BACKGROUND_LRU_NAME_CONF,
+               strlen(MEMORY_BACKGROUND_LRU_NAME_CONF)+1) && *config_type == LIMITER_CONFIG) {
 
                if (!pci) {
                        _E("process configuration information pointer should not be NULL");
                        return RESOURCED_ERROR_FAIL;
                }
 
-               /* Enable throttling of a service */
-               pci->memory_throttling_enable = config_parse_bool(result->value);
+               pci->is_in_memory_background_lru = config_parse_bool(result->value);
        }
        else if (!strncmp(result->name, CPU_THROTTLING_NAME_CONF,
                strlen(CPU_THROTTLING_NAME_CONF)+1) && *config_type == LIMITER_CONFIG) {
index cc73a67..c0fdef6 100644 (file)
@@ -48,8 +48,8 @@ extern "C" {
 #define MEMORY_LEVEL_THRESHOLD_SECTION      "MemoryLevelThreshold"
 #define MEMORY_APP_TYPE_LIMIT_SECTION       "MemoryAppTypeLimit"
 #define MEMORY_APP_STATUS_LIMIT_SECTION     "MemoryAppStatusLimit"
-#define MEMORY_THROTTLING_SECTION           "MemoryThrottling"
 #define MEMORY_LMK_GOVERNOR_SECTION         "MemoryLMKGovernor"
+#define MEMORY_BACKGROUND_LRU_SECTION       "MemoryBackgroundLru"
 #define CPU_THROTTLING_SECTION              "CpuThrottling"
 #define OLD_VIP_GROUP_SECTION               "VIP_GROUP"
 
@@ -85,7 +85,7 @@ extern "C" {
 #define        WATCHDOG_ACTION_NAME_CONF                    "WatchdogAction"
 #define OOM_SCORE_NAME_CONF                          "OomScore"
 #define FOREGROUND_OOM_SCORE_NAME_CONF               "ForegroundOomScore"
-#define THROTTLING_LIMIT_NAME_CONF                   "ThrottlingLimit"
+#define BACKGROUND_LRU_LIMIT_NAME_CONF               "BackgroundLruLimit"
 #define MEDIUM_LEVEL_NAME_CONF                       "MediumLevel"
 #define LOW_LEVEL_NAME_CONF                          "LowLevel"
 #define CRITICAL_LEVEL_NAME_CONF                     "CriticalLevel"
@@ -109,14 +109,14 @@ extern "C" {
 #define CPU_CFS_RUN_TIME_NAME_CONF                   "CpuCFSRuntime"
 #define CPU_CFS_PERIOD_NAME_CONF                     "CpuCFSPeriod"
 #define CPU_BOOSTING_LEVEL_NAME_CONF                 "CpuBoostingLevel"
-#define MEMORY_THROTTLING_NAME_CONF                  "MemoryThrottling"
+#define MEMORY_BACKGROUND_LRU_NAME_CONF              "MemoryBackgroundLru"
 #define CPU_THROTTLING_NAME_CONF                     "CpuThrottling"
 
 /* optimizer.conf */
 #define        SWAP_ENABLE_NAME_CONF                        "SwapEnable"
 #define RECLAIM_AT_BOOT_NAME_CONF                    "ReclaimAtBoot"
 #define SWAP_TYPE_NAME_CONF                          "SwapType"
-#define THROTTLING_SWAPPINESS_NAME_CONF              "ThrottlingSwappiness"
+#define BACKGROUND_LRU_SWAPPINESS_NAME_CONF          "BackgroundLruSwappiness"
 #define COMP_ALGORITHM_NAME_CONF                     "CompAlgorithm"
 #define ZRAM_RATIO_NAME_CONF                         "ZramRatio"
 #define POOL_RATIO_NAME_CONF                         "PoolRatio"
index 709e8e3..9b2f8e4 100644 (file)
@@ -36,7 +36,7 @@ struct swap_conf *get_swap_conf(void)
                        swap_conf->enable = false;
                        swap_conf->boot_reclaim_enable = false;
                        swap_conf->swap_type = SWAP_TYPE_NONE;
-                       swap_conf->swappiness[MEMCG_THROTTLING] = MEMORY_INIT_SWAPPINESS;
+                       swap_conf->swappiness[MEMCG_BACKGROUND_LRU] = MEMORY_INIT_SWAPPINESS;
                }
        }
 
index 833e2eb..54c3c48 100644 (file)
@@ -70,7 +70,7 @@ struct proc_conf_info {
        struct cpuset_info cpuset_info;
        int oom_score;
        bool is_app_in_foreground_app_list;
-       bool memory_throttling_enable;
+       bool is_in_memory_background_lru;
        bool cpu_throttling_enable;
        cpu_boosting_level_e cpu_boosting_level;
        pid_t pid;
index f418483..0a3c4d6 100644 (file)
@@ -335,8 +335,8 @@ static void lowmem_move_memcgroup(int pid, int next_oom_score_adj, struct proc_a
                        lowmem_convert_cgroup_type_to_str(next_memcg_idx));
 
                cgroup_write_pid_fullpath(mi->name, pid);
-               if (next_memcg_idx == MEMCG_THROTTLING)
-                       lowmem_swap_memory(get_memcg_info(MEMCG_THROTTLING)->name);
+               if (next_memcg_idx == MEMCG_BACKGROUND_LRU)
+                       lowmem_swap_memory(get_memcg_info(MEMCG_BACKGROUND_LRU)->name);
        } else {
                /* child pid */
                if (pai->memory.use_mem_limit)
@@ -389,7 +389,8 @@ static int high_mem_control(void *data)
        lowmem_change_lowmem_state(MEM_LEVEL_HIGH);
 
        if (swap_get_state() == SWAP_ON && lowmem_get_memcg_swap_status()) {
-               resourced_notify(RESOURCED_NOTIFIER_SWAP_UNSET_LIMIT, get_memcg_info(MEMCG_THROTTLING));
+               resourced_notify(RESOURCED_NOTIFIER_SWAP_UNSET_LIMIT,
+                               get_memcg_info(MEMCG_BACKGROUND_LRU));
                lowmem_set_memcg_swap_status(false);
        }
        if (proc_get_freezer_status() == CGROUP_FREEZER_PAUSED)
index deb8a63..3d8beaf 100644 (file)
@@ -89,7 +89,7 @@ static void lowmem_dbus_set_platform(GVariant *params)
        g_variant_get(params, gtype, &pid);
        ret_unless(pid > 0);
 
-       lowmem_trigger_swap(pid, get_memcg_info(MEMCG_THROTTLING)->name, true);
+       lowmem_trigger_swap(pid, get_memcg_info(MEMCG_BACKGROUND_LRU)->name, true);
 }
 
 static void lowmem_dbus_set_memlimit(GVariant *params)
index 2b51a9f..259720d 100644 (file)
@@ -318,8 +318,8 @@ static bool g_bg_reclaim = false;
 const char *lowmem_convert_cgroup_type_to_str(int type)
 {
        static const char *type_table[] =
-       {"/", "Throttling"};
-       if (type >= MEMCG_ROOT && type <= MEMCG_THROTTLING)
+       {"/", MEMCG_BACKGROUND_LRU_NAME};
+       if (type >= MEMCG_ROOT && type <= MEMCG_BACKGROUND_LRU)
                return type_table[type];
        else
                return "Error";
@@ -1148,7 +1148,7 @@ void lowmem_trigger_swap(pid_t pid, char *path, bool move)
                return;
        }
 
-       /* In this case, corresponding process will be moved to memory MEMCG_THROTTLING.
+       /* In this case, corresponding process will be moved to memory MEMCG_BACKGROUND_LRU.
         */
        if (move) {
                error = proc_get_oom_score_adj(pid, &oom_score_adj);
@@ -1170,7 +1170,8 @@ void lowmem_trigger_swap(pid_t pid, char *path, bool move)
        }
 
        /* Correponding process is already managed per app or service.
-        * In addition, if some process is already located in the MEMCG_THROTTLING, then just do swap
+        * In addition, if some process is already located in
+        * the MEMCG_BACKGROUND_LRU, then just do swap.
         */
        resourced_notify(RESOURCED_NOTIFIER_SWAP_START, path);
 }
@@ -1548,7 +1549,7 @@ static void load_configs(void)
        struct reclaim_conf *reclaim_conf = config_get_reclaim_conf();
 
        /* set MemoryGroupLimit section */
-       for (int cgroup = MEMCG_THROTTLING; cgroup < MEMCG_END; cgroup++) {
+       for (int cgroup = MEMCG_BACKGROUND_LRU; cgroup < MEMCG_END; cgroup++) {
                if (memcg_conf->cgroup_limit[cgroup] > 0.0)
                        memcg_info_set_limit(get_memcg_info(cgroup),
                                        memcg_conf->cgroup_limit[cgroup]/100.0, totalram_bytes);
@@ -1604,7 +1605,7 @@ free_memcg_conf:
 static void print_mem_configs(void)
 {
        /* print info of Memory section */
-       for (int cgroup = MEMCG_THROTTLING; cgroup < MEMCG_END; cgroup++) {
+       for (int cgroup = MEMCG_BACKGROUND_LRU; cgroup < MEMCG_END; cgroup++) {
                _I("[MEMORY-CGROUP] set memory for cgroup '%s' to %llu bytes",
                                lowmem_convert_cgroup_type_to_str(cgroup), get_memcg_info(cgroup)->limit_bytes);
        }
index 1e1d232..92a9c63 100644 (file)
@@ -846,10 +846,10 @@ static void swap_start_pid_dbus_signal_handler(GVariant *params)
                return;
        }
 
-       cgroup_swap = get_cgroup_tree(MEMCG_THROTTLING);
+       cgroup_swap = get_cgroup_tree(MEMCG_BACKGROUND_LRU);
        if (!cgroup_swap)
                return;
-       swap_move_to_cgroup_by_pid(MEMCG_THROTTLING, pid);
+       swap_move_to_cgroup_by_pid(MEMCG_BACKGROUND_LRU, pid);
        swap_start_handler(cgroup_swap->memcg_info->name);
        _I("[SWAP] swap cgroup entered : pid : %d", (int)pid);
 }
@@ -897,12 +897,13 @@ static int swap_parse_config_file(void)
 
        arg_swap_at_boot = swap_conf->boot_reclaim_enable;
 
-       if (swap_conf->swappiness[MEMCG_THROTTLING] >= 0 &&
-                       swap_conf->swappiness[MEMCG_THROTTLING] <= 100) {
-               memcg_info_set_swappiness(get_memcg_info(MEMCG_THROTTLING),
-                               swap_conf->swappiness[MEMCG_THROTTLING]);
+       if (swap_conf->swappiness[MEMCG_BACKGROUND_LRU] >= 0 &&
+                       swap_conf->swappiness[MEMCG_BACKGROUND_LRU] <= 100) {
+               memcg_info_set_swappiness(get_memcg_info(MEMCG_BACKGROUND_LRU),
+                               swap_conf->swappiness[MEMCG_BACKGROUND_LRU]);
                memcg_write_optimizer_params();
-               _I("[SWAP] cgroup (%s) swapiness = %d", "Throttling", get_memcg_info(MEMCG_THROTTLING)->swappiness);
+               _I("[SWAP] cgroup (%s) swapiness = %d", MEMCG_BACKGROUND_LRU_NAME,
+                               get_memcg_info(MEMCG_BACKGROUND_LRU)->swappiness);
        }
 
        gslist_for_each_item(iter, swap_module) {
@@ -1110,7 +1111,7 @@ static int resourced_swap_init(void *data)
 
        _D("[SWAP] resourced swap init start");
 
-       resourced_swap_change_memcg_settings(MEMCG_THROTTLING);
+       resourced_swap_change_memcg_settings(MEMCG_BACKGROUND_LRU);
        swap_set_state(SWAP_OFF);
 
        ret = swap_init();
index af0c46d..6e7dc8a 100644 (file)
@@ -224,7 +224,7 @@ static int swap_zram_reclaim(void *data)
        if (!swap_total_bytes)
                swap_total_bytes = KBYTE_TO_BYTE(proc_get_swap_total());
 
-       r = memcg_get_swap_usage(MEMCG_THROTTLING_PATH, &swap_usage_bytes);
+       r = memcg_get_swap_usage(MEMCG_BACKGROUND_LRU_PATH, &swap_usage_bytes);
        if (r)
                return r;
        swapcg_usage_ratio = (float)(swap_usage_bytes / (swap_total_bytes - swap_available_bytes) *100);
index 73bf158..b3262bc 100644 (file)
@@ -394,9 +394,9 @@ skip_scheduler_update:
                                _W("[WATCHDOG] Currently we support only REBOOT when a service is released");
                }
 
-               /* Put a system service or process into (memory) throttling group */
-               if (pci->memory_throttling_enable)
-                       cgroup_write_pid_fullpath(MEMCG_THROTTLING_PATH, pid);
+               /* Put a system service or process into (memory) BackgroundLru group */
+               if (pci->is_in_memory_background_lru)
+                       cgroup_write_pid_fullpath(MEMCG_BACKGROUND_LRU_PATH, pid);
 
                /* register a notification when this service or process memory is over a threshold */
                if (pci->mem_action.memory_bytes && pci->mem_action.action) {