]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
memcg, kmem: rename cache_from_memcg to cache_from_memcg_idx
authorQiang Huang <h.huangqiang@huawei.com>
Tue, 12 Nov 2013 23:08:23 +0000 (15:08 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Nov 2013 03:09:10 +0000 (12:09 +0900)
We can't see the relationship with memcg from the parameters,
so the name with memcg_idx would be more reasonable.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Glauber Costa <glommer@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slab.c
mm/slab.h
mm/slab_common.c
mm/slub.c

index 2580db062df97488a92beeb1e008d866db4d7f7e..0c8967bb201878e567c4d949ae1d9ee57cf04d0b 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3982,7 +3982,7 @@ static int do_tune_cpucache(struct kmem_cache *cachep, int limit,
 
        VM_BUG_ON(!mutex_is_locked(&slab_mutex));
        for_each_memcg_cache_index(i) {
-               c = cache_from_memcg(cachep, i);
+               c = cache_from_memcg_idx(cachep, i);
                if (c)
                        /* return value determined by the parent cache only */
                        __do_tune_cpucache(c, limit, batchcount, shared, gfp);
index a535033f7e9a153dfa7252dbb0d74f7be5ae4e58..0859c4241ba10b2ee602eca48af4e34dd82d6ae3 100644 (file)
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -160,7 +160,8 @@ static inline const char *cache_name(struct kmem_cache *s)
        return s->name;
 }
 
-static inline struct kmem_cache *cache_from_memcg(struct kmem_cache *s, int idx)
+static inline struct kmem_cache *
+cache_from_memcg_idx(struct kmem_cache *s, int idx)
 {
        if (!s->memcg_params)
                return NULL;
@@ -204,7 +205,8 @@ static inline const char *cache_name(struct kmem_cache *s)
        return s->name;
 }
 
-static inline struct kmem_cache *cache_from_memcg(struct kmem_cache *s, int idx)
+static inline struct kmem_cache *
+cache_from_memcg_idx(struct kmem_cache *s, int idx)
 {
        return NULL;
 }
index e2e98af703ea9fdcbab4bcd034bc82a1482c9ca6..0b7bb399b0e46af8ac8b96fbedb67aef413e5cb7 100644 (file)
@@ -571,7 +571,7 @@ memcg_accumulate_slabinfo(struct kmem_cache *s, struct slabinfo *info)
                return;
 
        for_each_memcg_cache_index(i) {
-               c = cache_from_memcg(s, i);
+               c = cache_from_memcg_idx(s, i);
                if (!c)
                        continue;
 
index c3eb3d3ca83565b925e197f2ad44ac2c313345b8..92737a0b787b57b0e5d8467879b50b4915a43f9e 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4983,7 +4983,7 @@ static ssize_t slab_attr_store(struct kobject *kobj,
                 * through the descendants with best-effort propagation.
                 */
                for_each_memcg_cache_index(i) {
-                       struct kmem_cache *c = cache_from_memcg(s, i);
+                       struct kmem_cache *c = cache_from_memcg_idx(s, i);
                        if (c)
                                attribute->store(c, buf, len);
                }