mm: memcontrol: give the kmem states more descriptive names
[deliverable/linux.git] / include / linux / memcontrol.h
index 189f04d4d2ecc36c706299dd11ecbd58bd64e315..54dab4d43e6db0d0cb48032c1853b3471ea491a7 100644 (file)
@@ -152,6 +152,12 @@ struct mem_cgroup_thresholds {
        struct mem_cgroup_threshold_ary *spare;
 };
 
+enum memcg_kmem_state {
+       KMEM_NONE,
+       KMEM_ALLOCATED,
+       KMEM_ONLINE,
+};
+
 /*
  * The memory controller data structure. The memory controller controls both
  * page cache and RSS per cgroup. We would eventually like to provide
@@ -233,8 +239,7 @@ struct mem_cgroup {
 #if defined(CONFIG_MEMCG_KMEM)
         /* Index in the kmem_cache->memcg_params.memcg_caches array */
        int kmemcg_id;
-       bool kmem_acct_activated;
-       bool kmem_acct_active;
+       enum memcg_kmem_state kmem_state;
 #endif
 
        int last_scanned_node;
@@ -750,9 +755,9 @@ static inline bool memcg_kmem_enabled(void)
        return static_branch_unlikely(&memcg_kmem_enabled_key);
 }
 
-static inline bool memcg_kmem_is_active(struct mem_cgroup *memcg)
+static inline bool memcg_kmem_online(struct mem_cgroup *memcg)
 {
-       return memcg->kmem_acct_active;
+       return memcg->kmem_state == KMEM_ONLINE;
 }
 
 /*
@@ -850,7 +855,7 @@ static inline bool memcg_kmem_enabled(void)
        return false;
 }
 
-static inline bool memcg_kmem_is_active(struct mem_cgroup *memcg)
+static inline bool memcg_kmem_online(struct mem_cgroup *memcg)
 {
        return false;
 }
This page took 0.025203 seconds and 5 git commands to generate.