Re: [PATCH 0/5] memcg/kmem: switch to white list policy
From: Tejun Heo
Date: Mon Nov 09 2015 - 15:31:04 EST
Hello, Vladimir.
On Mon, Nov 09, 2015 at 11:12:18PM +0300, Vladimir Davydov wrote:
> Because we won't be able to distinguish kmem_cache_alloc calls that
> should be accounted from those that shouldn't. The problem is if two
> caches
>
> A = kmem_cache_create(...)
>
> and
>
> B = kmem_cache_create(...)
>
> happen to be merged, A and B will point to the same kmem_cache struct.
> As a result, there is no way to distinguish
>
> kmem_cache_alloc(A)
>
> which we want to account from
>
> kmem_cache_alloc(B)
>
> which we don't.
Hmm.... can't we simply merge among !SLAB_ACCOUNT and SLAB_ACCOUNT
kmem_caches within themselves? I don't think we'd be losing anything
by restricting merge at that level. For anything to be tagged
SLAB_ACCOUNT, it has to have a potential to grow enormous after all.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/