lkml.org 
[lkml]   [2014]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/8] memcg, slab: never try to merge memcg caches
On Thu 06-02-14 18:15:50, Vladimir Davydov wrote:
> On 02/06/2014 06:07 PM, Michal Hocko wrote:
> > On Tue 04-02-14 19:27:19, Vladimir Davydov wrote:
> > [...]
> >> What does this patch change? Actually, it introduces no functional
> >> changes - it only remove the code trying to find an alias for a memcg
> >> cache, because it will fail anyway. So this is rather a cleanup.
> > But this also means that two different memcgs might share the same cache
> > and so the pages for that cache, no?
>
> No, because in this patch I explicitly forbid to merge memcg caches by
> this hunk:
>
> @@ -200,9 +200,11 @@ kmem_cache_create_memcg(struct mem_cgroup *memcg,
> const char *name, size_t size,
> */
> flags &= CACHE_CREATE_MASK;
>
> - s = __kmem_cache_alias(memcg, name, size, align, flags, ctor);
> - if (s)
> - goto out_unlock;
> + if (!memcg) {
> + s = __kmem_cache_alias(name, size, align, flags, ctor);
> + if (s)
> + goto out_unlock;
> + }

Ohh, that was the missing part. Thanks and sorry I have missed it. Maybe
it is worth mentioning in the changelog?
--
Michal Hocko
SUSE Labs


\
 
 \ /
  Last update: 2014-02-06 17:01    [W:0.386 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site