Skip to contentSkip to conversation

memcg-slab-separate-memcg-vs-root-cache-creation-paths.patch removed from -mm tree

merged [email protected] 1 participant 1 message Apr 8, 2014

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [merged] memcg-slab-separate-memcg-vs-root-cache-creation-paths.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 08 Apr 2014 14:42:25 -0700

The patch titled
Subject: memcg, slab: separate memcg vs root cache creation paths
has been removed from the -mm tree. Its filename was
memcg-slab-separate-memcg-vs-root-cache-creation-paths.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Vladimir Davydov <[email protected]>
Subject: memcg, slab: separate memcg vs root cache creation paths

Memcg-awareness turned kmem_cache_create() into a dirty interweaving of memcg-only and except-for-memcg calls. To clean this up, let's move the code responsible for memcg cache creation to a separate function.

Cc Michal Hocko <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc David Rientjes <[email protected]>
Cc Pekka Enberg <[email protected]>
Cc Glauber Costa <[email protected]>

---

 include/linux/memcontrol.h |    6 -
 include/linux/slab.h       |    6 -
 mm/memcontrol.c            |    7 -
 mm/slab_common.c           |  187 ++++++++++++++++++++---------------
 4 files changed, 111 insertions(+), 95 deletions(-)
include/linux/memcontrol.h renamed from include/linux/memcontrol.h~memcg-slab-separate-memcg-vs-root-cache-creation-paths +0 -6
diff -puN include/linux/memcontrol.h~memcg-slab-separate-memcg-vs-root-cache-creation-paths include/linux/memcontrol.h
@@ -638,12 +638,6 @@ static inline int memcg_cache_id(struct
 	return -1;
 }
 
-static inline char *memcg_create_cache_name(struct mem_cgroup *memcg,
-					    struct kmem_cache *root_cache)
-{
-	return NULL;
-}
-
 static inline int memcg_alloc_cache_params(struct mem_cgroup *memcg,
 		struct kmem_cache *s, struct kmem_cache *root_cache)
 {
include/linux/slab.h renamed from include/linux/slab.h~memcg-slab-separate-memcg-vs-root-cache-creation-paths +3 -3
diff -puN include/linux/slab.h~memcg-slab-separate-memcg-vs-root-cache-creation-paths include/linux/slab.h
@@ -115,9 +115,9 @@ int slab_is_available(void);
 struct kmem_cache *kmem_cache_create(const char *, size_t, size_t,
 			unsigned long,
 			void (*)(void *));
-struct kmem_cache *
-kmem_cache_create_memcg(struct mem_cgroup *, const char *, size_t, size_t,
-			unsigned long, void (*)(void *), struct kmem_cache *);
+#ifdef CONFIG_MEMCG_KMEM
+void kmem_cache_create_memcg(struct mem_cgroup *, struct kmem_cache *);
+#endif
 void kmem_cache_destroy(struct kmem_cache *);
 int kmem_cache_shrink(struct kmem_cache *);
 void kmem_cache_free(struct kmem_cache *, void *);
mm/memcontrol.c renamed from mm/memcontrol.c~memcg-slab-separate-memcg-vs-root-cache-creation-paths +1 -6
diff -puN mm/memcontrol.c~memcg-slab-separate-memcg-vs-root-cache-creation-paths mm/memcontrol.c
@@ -3395,13 +3395,8 @@ static void memcg_create_cache_work_func
 	struct create_work *cw = container_of(w, struct create_work, work);
 	struct mem_cgroup *memcg = cw->memcg;
 	struct kmem_cache *cachep = cw->cachep;
-	struct kmem_cache *new;
 
-	new = kmem_cache_create_memcg(memcg, cachep->name,
-			cachep->object_size, cachep->align,
-			cachep->flags & ~SLAB_PANIC, cachep->ctor, cachep);
-	if (new)
-		new->allocflags |= __GFP_KMEMCG;
+	kmem_cache_create_memcg(memcg, cachep);
 	css_put(&memcg->css);
 	kfree(cw);
 }
mm/slab_common.c renamed from mm/slab_common.c~memcg-slab-separate-memcg-vs-root-cache-creation-paths +107 -80

252 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

origin.patch