Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756776Ab2FZFYt (ORCPT ); Tue, 26 Jun 2012 01:24:49 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:61296 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750799Ab2FZFYr (ORCPT ); Tue, 26 Jun 2012 01:24:47 -0400 Date: Mon, 25 Jun 2012 22:24:44 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Andrew Morton cc: Glauber Costa , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Frederic Weisbecker , Pekka Enberg , Michal Hocko , Johannes Weiner , Christoph Lameter , devel@openvz.org, kamezawa.hiroyu@jp.fujitsu.com, Tejun Heo , Pekka Enberg , Suleiman Souhlal Subject: Re: [PATCH 09/11] memcg: propagate kmem limiting information to children In-Reply-To: <20120625162352.51997c5a.akpm@linux-foundation.org> Message-ID: References: <1340633728-12785-1-git-send-email-glommer@parallels.com> <1340633728-12785-10-git-send-email-glommer@parallels.com> <20120625162352.51997c5a.akpm@linux-foundation.org> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1001 Lines: 37 On Mon, 25 Jun 2012, Andrew Morton wrote: > > --- a/mm/memcontrol.c > > +++ b/mm/memcontrol.c > > @@ -287,7 +287,11 @@ struct mem_cgroup { > > * Should the accounting and control be hierarchical, per subtree? > > */ > > bool use_hierarchy; > > - bool kmem_accounted; > > + /* > > + * bit0: accounted by this cgroup > > + * bit1: accounted by a parent. > > + */ > > + volatile unsigned long kmem_accounted; > > I suggest > > unsigned long kmem_accounted; /* See KMEM_ACCOUNTED_*, below */ > > > bool oom_lock; > > atomic_t under_oom; > > @@ -340,6 +344,9 @@ struct mem_cgroup { > > #endif > > }; > > > > +#define KMEM_ACCOUNTED_THIS 0 > > +#define KMEM_ACCOUNTED_PARENT 1 > > And then document the fields here. > In hex, please? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/