Re: [Devel] [PATCH 1/8] memcg: export kmemcg cache id via cgroup fs

2014-02-04 Thread Michal Hocko
On Sun 02-02-14 20:33:46, Vladimir Davydov wrote: Per-memcg kmem caches are named as follows: global-cache-name(cgroup-kmem-id:cgroup-name) where cgroup-kmem-id is the unique id of the memcg the cache belongs to, cgroup-name is the relative name of the memcg on the cgroup fs. Cache

Re: [Devel] [PATCH 1/8] memcg: export kmemcg cache id via cgroup fs

2014-02-04 Thread Michal Hocko
On Mon 03-02-14 10:57:03, Vladimir Davydov wrote: On 02/03/2014 10:21 AM, David Rientjes wrote: On Sun, 2 Feb 2014, Vladimir Davydov wrote: Per-memcg kmem caches are named as follows: global-cache-name(cgroup-kmem-id:cgroup-name) where cgroup-kmem-id is the unique id of the memcg

Re: [Devel] [PATCH 1/8] memcg: export kmemcg cache id via cgroup fs

2014-02-04 Thread Vladimir Davydov
On 02/04/2014 06:40 PM, Michal Hocko wrote: On Sun 02-02-14 20:33:46, Vladimir Davydov wrote: Per-memcg kmem caches are named as follows: global-cache-name(cgroup-kmem-id:cgroup-name) where cgroup-kmem-id is the unique id of the memcg the cache belongs to, cgroup-name is the relative name

Re: [Devel] [PATCH 3/8] memcg, slab: never try to merge memcg caches

2014-02-04 Thread Vladimir Davydov
On 02/04/2014 06:52 PM, Michal Hocko wrote: On Sun 02-02-14 20:33:48, Vladimir Davydov wrote: Suppose we are creating memcg cache A that could be merged with cache B of the same memcg. Since any memcg cache has the same parameters as its parent cache, parent caches PA and PB of memcg caches A

Re: [Devel] [PATCH 2/8] memcg, slab: remove cgroup name from memcg cache names

2014-02-04 Thread Michal Hocko
On Sun 02-02-14 20:33:47, Vladimir Davydov wrote: The cgroup name is not informative at all in case the cgroup hierarchy is not flat. Besides, we can always find the memcg a particular cache belongs to by its kmemcg id, which is now exported via memory.kmem.id cgroup fs file for each memcg.

Re: [Devel] [PATCH 3/8] memcg, slab: never try to merge memcg caches

2014-02-04 Thread Michal Hocko
On Sun 02-02-14 20:33:48, Vladimir Davydov wrote: Suppose we are creating memcg cache A that could be merged with cache B of the same memcg. Since any memcg cache has the same parameters as its parent cache, parent caches PA and PB of memcg caches A and B must be mergeable too. That means PA

Re: [Devel] [PATCH 3/8] memcg, slab: never try to merge memcg caches

2014-02-04 Thread Michal Hocko
On Tue 04-02-14 18:59:23, Vladimir Davydov wrote: On 02/04/2014 06:52 PM, Michal Hocko wrote: On Sun 02-02-14 20:33:48, Vladimir Davydov wrote: Suppose we are creating memcg cache A that could be merged with cache B of the same memcg. Since any memcg cache has the same parameters as its

Re: [Devel] [PATCH 2/8] memcg, slab: remove cgroup name from memcg cache names

2014-02-04 Thread Vladimir Davydov
On 02/04/2014 06:45 PM, Michal Hocko wrote: On Sun 02-02-14 20:33:47, Vladimir Davydov wrote: The cgroup name is not informative at all in case the cgroup hierarchy is not flat. Besides, we can always find the memcg a particular cache belongs to by its kmemcg id, which is now exported via

Re: [Devel] [PATCH 2/8] memcg, slab: remove cgroup name from memcg cache names

2014-02-04 Thread Michal Hocko
On Tue 04-02-14 19:11:24, Vladimir Davydov wrote: On 02/04/2014 06:45 PM, Michal Hocko wrote: On Sun 02-02-14 20:33:47, Vladimir Davydov wrote: The cgroup name is not informative at all in case the cgroup hierarchy is not flat. Besides, we can always find the memcg a particular cache

Re: [Devel] [PATCH 3/8] memcg, slab: never try to merge memcg caches

2014-02-04 Thread Vladimir Davydov
On 02/04/2014 07:11 PM, Michal Hocko wrote: On Tue 04-02-14 18:59:23, Vladimir Davydov wrote: On 02/04/2014 06:52 PM, Michal Hocko wrote: On Sun 02-02-14 20:33:48, Vladimir Davydov wrote: Suppose we are creating memcg cache A that could be merged with cache B of the same memcg. Since any

Re: [Devel] [PATCH] memcg, slab: cleanup memcg cache creation

2014-02-04 Thread Michal Hocko
On Tue 04-02-14 11:39:07, Vladimir Davydov wrote: This patch cleanups 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

Re: [Devel] [PATCH 3/8] memcg, slab: never try to merge memcg caches

2014-02-04 Thread Glauber Costa
On Tue, Feb 4, 2014 at 7:27 PM, Vladimir Davydov vdavy...@parallels.com wrote: On 02/04/2014 07:11 PM, Michal Hocko wrote: On Tue 04-02-14 18:59:23, Vladimir Davydov wrote: On 02/04/2014 06:52 PM, Michal Hocko wrote: On Sun 02-02-14 20:33:48, Vladimir Davydov wrote: Suppose we are creating

Re: [Devel] [PATCH 3/8] memcg, slab: never try to merge memcg caches

2014-02-04 Thread Vladimir Davydov
On 02/04/2014 07:43 PM, Glauber Costa wrote: On Tue, Feb 4, 2014 at 7:27 PM, Vladimir Davydov vdavy...@parallels.com wrote: On 02/04/2014 07:11 PM, Michal Hocko wrote: On Tue 04-02-14 18:59:23, Vladimir Davydov wrote: On 02/04/2014 06:52 PM, Michal Hocko wrote: On Sun 02-02-14 20:33:48,

Re: [Devel] [PATCH] memcg, slab: cleanup memcg cache creation

2014-02-04 Thread Vladimir Davydov
On 02/04/2014 07:33 PM, Michal Hocko wrote: On Tue 04-02-14 11:39:07, Vladimir Davydov wrote: This patch cleanups 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

Re: [Devel] [PATCH v2 3/7] memcg, slab: separate memcg vs root cache creation paths

2014-02-04 Thread Michal Hocko
On Mon 03-02-14 19:54:38, Vladimir Davydov wrote: Memcg-awareness turned kmem_cache_create() into a dirty interweaving of memcg-only and except-for-memcg calls. To clean this up, let's create a separate function handling memcg caches creation. Although this will result in the two functions

Re: [Devel] [PATCH v2 3/7] memcg, slab: separate memcg vs root cache creation paths

2014-02-04 Thread Vladimir Davydov
On 02/04/2014 08:03 PM, Michal Hocko wrote: On Mon 03-02-14 19:54:38, Vladimir Davydov wrote: Memcg-awareness turned kmem_cache_create() into a dirty interweaving of memcg-only and except-for-memcg calls. To clean this up, let's create a separate function handling memcg caches creation.

Re: [Devel] [PATCH 2/3] mm: vmscan: get rid of DEFAULT_SEEKS and document shrink_slab logic

2014-02-04 Thread Andrew Morton
On Fri, 17 Jan 2014 23:25:30 +0400 Vladimir Davydov vdavy...@parallels.com wrote: Each shrinker must define the number of seeks it takes to recreate a shrinkable cache object. It is used to balance slab reclaim vs page reclaim: assuming it costs one seek to replace an LRU page, we age equal