[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151109203053.GD28507@mtj.duckdns.org>
Date: Mon, 9 Nov 2015 15:30:53 -0500
From: Tejun Heo <tj@...nel.org>
To: Vladimir Davydov <vdavydov@...tuozzo.com>
Cc: Michal Hocko <mhocko@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>,
Greg Thelen <gthelen@...gle.com>, linux-mm@...ck.org,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/5] memcg/kmem: switch to white list policy
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists