Re: [PATCH v2 2/7] memcg, slab: cleanup memcg cache name creation

2014-02-03 Thread Vladimir Davydov
On 02/04/2014 02:08 AM, Andrew Morton wrote: > On Mon, 3 Feb 2014 19:54:37 +0400 Vladimir Davydov > wrote: > >> The way memcg_create_kmem_cache() creates the name for a memcg cache >> looks rather strange: it first formats the name in the static buffer >> tmp_name protected by a mutex, then passe

Re: [PATCH v2 2/7] memcg, slab: cleanup memcg cache name creation

2014-02-03 Thread Andrew Morton
On Mon, 3 Feb 2014 19:54:37 +0400 Vladimir Davydov wrote: > The way memcg_create_kmem_cache() creates the name for a memcg cache > looks rather strange: it first formats the name in the static buffer > tmp_name protected by a mutex, then passes the pointer to the buffer to > kmem_cache_create_me

[PATCH v2 2/7] memcg, slab: cleanup memcg cache name creation

2014-02-03 Thread Vladimir Davydov
The way memcg_create_kmem_cache() creates the name for a memcg cache looks rather strange: it first formats the name in the static buffer tmp_name protected by a mutex, then passes the pointer to the buffer to kmem_cache_create_memcg(), which finally duplicates it to the cache name. Let's clean th