Subject: + memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx.patch added to -mm tree To: h.huangqiang@xxxxxxxxxx,glommer@xxxxxxxxxxxxx,hannes@xxxxxxxxxxx,mhocko@xxxxxxx,penberg@xxxxxxxxxx,rientjes@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Fri, 01 Nov 2013 13:12:17 -0700 The patch titled Subject: memcg, kmem: rename cache_from_memcg to cache_from_memcg_idx has been added to the -mm tree. Its filename is memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Qiang Huang <h.huangqiang@xxxxxxxxxx> Subject: memcg, kmem: rename cache_from_memcg to cache_from_memcg_idx 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@xxxxxxxxxx> Reviewed-by: Pekka Enberg <penberg@xxxxxxxxxx> Acked-by: David Rientjes <rientjes@xxxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxx> Cc: Glauber Costa <glommer@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slab.c | 2 +- mm/slab.h | 6 ++++-- mm/slab_common.c | 2 +- mm/slub.c | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff -puN mm/slab.c~memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx mm/slab.c --- a/mm/slab.c~memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx +++ a/mm/slab.c @@ -3982,7 +3982,7 @@ static int do_tune_cpucache(struct kmem_ 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); diff -puN mm/slab.h~memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx mm/slab.h --- a/mm/slab.h~memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx +++ a/mm/slab.h @@ -160,7 +160,8 @@ static inline const char *cache_name(str 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(str 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; } diff -puN mm/slab_common.c~memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx mm/slab_common.c --- a/mm/slab_common.c~memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx +++ a/mm/slab_common.c @@ -571,7 +571,7 @@ memcg_accumulate_slabinfo(struct kmem_ca return; for_each_memcg_cache_index(i) { - c = cache_from_memcg(s, i); + c = cache_from_memcg_idx(s, i); if (!c) continue; diff -puN mm/slub.c~memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx mm/slub.c --- a/mm/slub.c~memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx +++ a/mm/slub.c @@ -4983,7 +4983,7 @@ static ssize_t slab_attr_store(struct ko * 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); } _ Patches currently in -mm which might be from h.huangqiang@xxxxxxxxxx are mm-add-a-helper-function-to-check-may-oom-condition.patch memcg-kmem-use-is_root_cache-instead-of-hard-code.patch memcg-kmem-rename-cache_from_memcg-to-cache_from_memcg_idx.patch memcg-kmem-use-cache_from_memcg_idx-instead-of-hard-code.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html