[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALvZod7B3Xw4n9jY-+m-z7-iQ+5uE_WKKOo9YHk4s+ebOyCk5g@mail.gmail.com>
Date: Mon, 22 Jun 2020 22:25:16 -0700
From: Shakeel Butt <shakeelb@...gle.com>
To: Roman Gushchin <guro@...com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Christoph Lameter <cl@...ux.com>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Linux MM <linux-mm@...ck.org>,
Vlastimil Babka <vbabka@...e.cz>,
Kernel Team <kernel-team@...com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 17/19] mm: memcg/slab: use a single set of kmem_caches
for all allocations
On Mon, Jun 22, 2020 at 6:58 PM Roman Gushchin <guro@...com> wrote:
>
> Instead of having two sets of kmem_caches: one for system-wide and
> non-accounted allocations and the second one shared by all accounted
> allocations, we can use just one.
>
> The idea is simple: space for obj_cgroup metadata can be allocated on
> demand and filled only for accounted allocations.
>
> It allows to remove a bunch of code which is required to handle kmem_cache
> clones for accounted allocations. There is no more need to create them,
> accumulate statistics, propagate attributes, etc. It's a quite
> significant simplification.
>
> Also, because the total number of slab_caches is reduced almost twice (not
> all kmem_caches have a memcg clone), some additional memory savings are
> expected. On my devvm it additionally saves about 3.5% of slab memory.
>
> Suggested-by: Johannes Weiner <hannes@...xchg.org>
> Signed-off-by: Roman Gushchin <guro@...com>
> Reviewed-by: Vlastimil Babka <vbabka@...e.cz>
Reviewed-by: Shakeel Butt <shakeelb@...gle.com>
Powered by blists - more mailing lists