[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FDF20ED.4090401@jp.fujitsu.com>
Date: Mon, 18 Jun 2012 21:37:01 +0900
From: Kamezawa Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Glauber Costa <glommer@...allels.com>
CC: linux-mm@...ck.org, Pekka Enberg <penberg@...nel.org>,
Cristoph Lameter <cl@...ux.com>,
David Rientjes <rientjes@...gle.com>, cgroups@...r.kernel.org,
devel@...nvz.org, linux-kernel@...r.kernel.org,
Frederic Weisbecker <fweisbec@...il.com>,
Suleiman Souhlal <suleiman@...gle.com>,
Pekka Enberg <penberg@...helsinki.fi>,
Michal Hocko <mhocko@...e.cz>,
Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH v4 23/25] memcg: propagate kmem limiting information to
children
(2012/06/18 19:28), Glauber Costa wrote:
> The current memcg slab cache management fails to present satisfatory hierarchical
> behavior in the following scenario:
>
> -> /cgroups/memory/A/B/C
>
> * kmem limit set at A
> * A and B empty taskwise
> * bash in C does find /
>
> Because kmem_accounted is a boolean that was not set for C, no accounting
> would be done. This is, however, not what we expect.
>
Hmm....do we need this new routines even while we have mem_cgroup_iter() ?
Doesn't this work ?
struct mem_cgroup {
.....
bool kmem_accounted_this;
atomic_t kmem_accounted;
....
}
at set limit
....set_limit(memcg) {
if (newly accounted) {
mem_cgroup_iter() {
atomic_inc(&iter->kmem_accounted)
}
} else {
mem_cgroup_iter() {
atomic_dec(&iter->kmem_accounted);
}
}
hm ? Then, you can see kmem is accounted or not by atomic_read(&memcg->kmem_accounted);
Thanks,
-Kame
--
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