memcg-slab-cleanup-memcg-cache-creation.patch removed from -mm tree
Subsystems (3)
[email protected]
maintainerSubject: [merged] memcg-slab-cleanup-memcg-cache-creation.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:41:53 -0700
The patch titled
Subject: memcg, slab: cleanup memcg cache creation
has been removed from the -mm tree. Its filename was
memcg-slab-cleanup-memcg-cache-creation.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Vladimir Davydov <[email protected]>
Subject: memcg, slab: cleanup memcg cache creation
This patch cleans up the memcg cache creation path as follows:
- Move memcg cache name creation to a separate function to be called from kmem_cache_create_memcg(). This allows us to get rid of the mutex protecting the temporary buffer used for the name formatting, because the whole cache creation path is protected by the slab_mutex.
- Get rid of memcg_create_kmem_cache(). This function serves as a proxy to kmem_cache_create_memcg(). After separating the cache name creation path, it would be reduced to a function call, so let's inline it.
---
include/linux/memcontrol.h | 9 +++ mm/memcontrol.c | 91 +++++++++++++++-------------------- mm/slab_common.c | 5 + 3 files changed, 53 insertions(+), 52 deletions(-)
include/linux/memcontrol.h renamed from include/linux/memcontrol.h~memcg-slab-cleanup-memcg-cache-creation +9 -0
@@ -491,6 +491,9 @@ void __memcg_kmem_commit_charge(struct pvoid __memcg_kmem_uncharge_pages (struct page *page,int order);int memcg_cache_id (struct mem_cgroup *memcg); + +char *memcg_create_cache_name (struct mem_cgroup *memcg, +struct kmem_cache *root_cache);int memcg_alloc_cache_params (struct mem_cgroup *memcg,struct kmem_cache *s,struct kmem_cache *root_cache);void memcg_free_cache_params (struct kmem_cache *s);
@@ -635,6 +638,12 @@ static inline int memcg_cache_id(structreturn -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) {
mm/memcontrol.c renamed from mm/memcontrol.c~memcg-slab-cleanup-memcg-cache-creation +40 -51
117 lines not on this page · raw message
mm/slab_common.c renamed from mm/slab_common.c~memcg-slab-cleanup-memcg-cache-creation +4 -1
@@ -215,7 +215,10 @@ kmem_cache_create_memcg(struct mem_cgrou s->align =calculate_alignment (flags, align, size); s->ctor = ctor; - s->name =kstrdup (name,GFP_KERNEL ); +if (memcg) + s->name =memcg_create_cache_name (memcg, parent_cache); +else + s->name =kstrdup (name,GFP_KERNEL );if (!s->name) goto out_free_cache;
_
Patches currently in -mm which might be from [email protected] are
origin.patch