From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757485Ab2DXUHk (ORCPT ); Tue, 24 Apr 2012 16:07:40 -0400 Received: from oproxy1-pub.bluehost.com ([66.147.249.253]:54016 "HELO oproxy1-pub.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757461Ab2DXUHh (ORCPT ); Tue, 24 Apr 2012 16:07:37 -0400 Message-ID: <4F970826.8030702@xenotime.net> Date: Tue, 24 Apr 2012 13:08:06 -0700 From: Randy Dunlap User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110323 Thunderbird/3.1.9 MIME-Version: 1.0 To: Johannes Weiner CC: Andrew Morton , Michal Hocko , KOSAKI Motohiro , Ying Han , KAMEZAWA Hiroyuki , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [patch] Documentation: memcg: future proof hierarchical statistics documentation References: <1335296038-29297-1-git-send-email-hannes@cmpxchg.org> In-Reply-To: <1335296038-29297-1-git-send-email-hannes@cmpxchg.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Identified-User: {1807:box742.bluehost.com:xenotime:xenotime.net} {sentby:smtp auth 50.53.38.135 authed with rdunlap@xenotime.net} Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/24/2012 12:33 PM, Johannes Weiner wrote: > The hierarchical versions of per-memcg counters in memory.stat are all > calculated the same way and are all named total_. > > Documenting the pattern is easier for maintenance than listing each > counter twice. > > Signed-off-by: Johannes Weiner > Acked-by: Michal Hocko > Acked-by: KOSAKI Motohiro > Acked-by: Ying Han > --- > Documentation/cgroups/memory.txt | 15 ++++----------- > 1 files changed, 4 insertions(+), 11 deletions(-) > > diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt > index ab34ae5..6a066a2 100644 > --- a/Documentation/cgroups/memory.txt > +++ b/Documentation/cgroups/memory.txt > @@ -432,17 +432,10 @@ hierarchical_memory_limit - # of bytes of memory limit with regard to hierarchy > hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to > hierarchy under which memory cgroup is. > > -total_cache - sum of all children's "cache" > -total_rss - sum of all children's "rss" > -total_mapped_file - sum of all children's "cache" > -total_pgpgin - sum of all children's "pgpgin" > -total_pgpgout - sum of all children's "pgpgout" > -total_swap - sum of all children's "swap" > -total_inactive_anon - sum of all children's "inactive_anon" > -total_active_anon - sum of all children's "active_anon" > -total_inactive_file - sum of all children's "inactive_file" > -total_active_file - sum of all children's "active_file" > -total_unevictable - sum of all children's "unevictable" > +total_ - # hierarchical version of , which in > + addition to the cgroup's own value includes the > + sum of all hierarchical children's values of > + , i.e. total_cache e.g., total_cache But how is a user or an admin supposed to know what all of the valid total_ names are? Is the entire list documented anywhere else other than here (which is being deleted)? > # The following additional stats are dependent on CONFIG_DEBUG_VM. > -- ~Randy