Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753242Ab3IOTEL (ORCPT ); Sun, 15 Sep 2013 15:04:11 -0400 Received: from zene.cmpxchg.org ([85.214.230.12]:55101 "EHLO zene.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752213Ab3IOTEJ (ORCPT ); Sun, 15 Sep 2013 15:04:09 -0400 Date: Sun, 15 Sep 2013 15:04:01 -0400 From: Johannes Weiner To: Greg Thelen Cc: Andrew Morton , Michal Hocko , Balbir Singh , KAMEZAWA Hiroyuki , hughd@google.com, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ying Han Subject: Re: [PATCH 2/2 v3] memcg: support hierarchical memory.numa_stats Message-ID: <20130915190401.GC3278@cmpxchg.org> References: <1378362539-18100-1-git-send-email-gthelen@google.com> <1378362539-18100-2-git-send-email-gthelen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1378362539-18100-2-git-send-email-gthelen@google.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2146 Lines: 59 Hello Greg! On Wed, Sep 04, 2013 at 11:28:59PM -0700, Greg Thelen wrote: > --- a/Documentation/cgroups/memory.txt > +++ b/Documentation/cgroups/memory.txt > @@ -571,15 +571,19 @@ an memcg since the pages are allowed to be allocated from any physical > node. One of the use cases is evaluating application performance by > combining this information with the application's CPU allocation. > > -We export "total", "file", "anon" and "unevictable" pages per-node for > -each memcg. The ouput format of memory.numa_stat is: > +Each memcg's numa_stat file includes "total", "file", "anon" and "unevictable" > +per-node page counts including "hierarchical_" which sums of all > +hierarchical children's values in addition to the memcg's own value. "[...] which sums UP [...]"? > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -5394,6 +5394,7 @@ static int memcg_numa_stat_show(struct cgroup *cont, struct cftype *cft, > int nid; > unsigned long nr; > struct mem_cgroup *memcg = mem_cgroup_from_cont(cont); > + struct mem_cgroup *iter; > > for (stat = stats; stat->name; stat++) { > nr = mem_cgroup_nr_lru_pages(memcg, stat->lru_mask); > @@ -5406,6 +5407,21 @@ static int memcg_numa_stat_show(struct cgroup *cont, struct cftype *cft, > seq_putc(m, '\n'); > } > > + for (stat = stats; stat->name; stat++) { Move the struct mem_cgroup *iter declaration here? > + nr = 0; > + for_each_mem_cgroup_tree(iter, memcg) > + nr += mem_cgroup_nr_lru_pages(iter, stat->lru_mask); > + seq_printf(m, "hierarchical_%s=%lu", stat->name, nr); > + for_each_node_state(nid, N_MEMORY) { > + nr = 0; > + for_each_mem_cgroup_tree(iter, memcg) > + nr += mem_cgroup_node_nr_lru_pages( > + iter, nid, stat->lru_mask); > + seq_printf(m, " N%d=%lu", nid, nr); > + } > + seq_putc(m, '\n'); > + } > + > return 0; > } > #endif /* CONFIG_NUMA */ Rest looks fine to me. -- 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/