Thread (14 messages) 14 messages, 4 authors, 2016-07-14

Re: [PATCH 3/3] mm: memcontrol: fix cgroup creation failure after many small jobs

From: Johannes Weiner <hannes@cmpxchg.org>
Date: 2016-06-21 15:48:49
Also in: cgroups, lkml
Subsystem: control group - memory resource controller (memcg), memory management, the rest · Maintainers: Johannes Weiner, Michal Hocko, Roman Gushchin, Shakeel Butt, Andrew Morton, Linus Torvalds

On Tue, Jun 21, 2016 at 01:16:51PM +0300, Vladimir Davydov wrote:
On Fri, Jun 17, 2016 at 12:25:16PM -0400, Johannes Weiner wrote:
quoted
After this patch, the IDs get released upon cgroup destruction and the
cache and css objects get released once memory reclaim kicks in.
With 65K cgroups it will take the reclaimer a substantial amount of time
to iterate over all of them, which might result in latency spikes.
Probably, to avoid that, we could move pages from a dead cgroup's lru to
its parent's one on offline while still leaving dead cgroups pinned,
like we do in case of list_lru entries.
Yep, that is true. list_lru is a bit easier because the walker stays
in the context of the original LRU list, whereas the cache/anon LRUs
are not. We'd have to have mem_cgroup_page_lruvec() etc. do a parent
walk to find the closest live ancestor. Maybe you have a better idea?

But it's definitely worth considering. I'll think more about it.
quoted
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Vladimir Davydov <redacted>
Thanks!
quoted
+static struct idr mem_cgroup_idr;
static DEFINE_IDR(mem_cgroup_idr);
Oops, good catch. Andrew, could you kindly fold this?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help