From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with ESMTP id 4AFFC6B0012 for ; Thu, 19 May 2011 21:31:51 -0400 (EDT) Received: from hpaq7.eem.corp.google.com (hpaq7.eem.corp.google.com [172.25.149.7]) by smtp-out.google.com with ESMTP id p4K1Vljp027949 for ; Thu, 19 May 2011 18:31:47 -0700 Received: from qyg14 (qyg14.prod.google.com [10.241.82.142]) by hpaq7.eem.corp.google.com with ESMTP id p4K1Vf6c002936 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 19 May 2011 18:31:46 -0700 Received: by qyg14 with SMTP id 14so2128042qyg.5 for ; Thu, 19 May 2011 18:31:41 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110520092424.1f1b514f.kamezawa.hiroyu@jp.fujitsu.com> References: <1305826360-2167-1-git-send-email-yinghan@google.com> <1305826360-2167-3-git-send-email-yinghan@google.com> <20110520085152.e518ac71.kamezawa.hiroyu@jp.fujitsu.com> <20110520092424.1f1b514f.kamezawa.hiroyu@jp.fujitsu.com> Date: Thu, 19 May 2011 18:31:41 -0700 Message-ID: Subject: Re: [PATCH V3 3/3] memcg: add memory.numastat api for numa statistics From: Ying Han Content-Type: multipart/alternative; boundary=0015175d015e6e420204a3ab1517 Sender: owner-linux-mm@kvack.org List-ID: To: KAMEZAWA Hiroyuki Cc: KOSAKI Motohiro , Minchan Kim , Daisuke Nishimura , Balbir Singh , Tejun Heo , Pavel Emelyanov , Andrew Morton , Li Zefan , Mel Gorman , Christoph Lameter , Johannes Weiner , Rik van Riel , Hugh Dickins , Michal Hocko , Dave Hansen , Zhu Yanhai , linux-mm@kvack.org --0015175d015e6e420204a3ab1517 Content-Type: text/plain; charset=ISO-8859-1 On Thu, May 19, 2011 at 5:24 PM, KAMEZAWA Hiroyuki < kamezawa.hiroyu@jp.fujitsu.com> wrote: > On Thu, 19 May 2011 17:11:49 -0700 > Ying Han wrote: > > > On Thu, May 19, 2011 at 4:51 PM, KAMEZAWA Hiroyuki < > > kamezawa.hiroyu@jp.fujitsu.com> wrote: > > > > > On Thu, 19 May 2011 10:32:40 -0700 > > > Ying Han wrote: > > > > > > > The new API exports numa_maps per-memcg basis. This is a piece of > useful > > > > information where it exports per-memcg page distribution across real > numa > > > > nodes. > > > > > > > > One of the usecase is evaluating application performance by combining > > > this > > > > information w/ the cpu allocation to the application. > > > > > > > > The output of the memory.numastat tries to follow w/ simiar format of > > > numa_maps > > > > like: > > > > > > > > total= N0= N1= ... > > > > file= N0= N1= ... > > > > anon= N0= N1= ... > > > > > > > > $ cat /dev/cgroup/memory/memory.numa_stat > > > > total=246594 N0=18225 N1=72025 N2=26378 N3=129966 > > > > file=221728 N0=15030 N1=60804 N2=23238 N3=122656 > > > > anon=21120 N0=2937 N1=7733 N2=3140 N3=7310 > > > > > > > > > > Hmm ? this doesn't seem consistent....Isn't this log updated ? > > > > > > > Nope. This is the V3 i posted w/ updated testing result. > > > > Did you get this log while applications are running and LRU are changing ? > See N1, 72505 != 60804 + 7733. big error. > Could you clarify why total != file + anon ? > Does the number seems consistent when the system is calm ? > That is because the total includes "unevictable" which is not listed here as "file" and "anon" > > > BTW, I wonder why unevictable is not shown... > mem_cgroup_node_nr_lru_pages() counts unevictable into it because of > for_each_lru(). > > There are 2 ways. > 1. show unevictable > 2. use for_each_evictable_lru(). > > I vote for 1. > Sounds good to me, I can add the "unevictable" following the "file" and "anon" on the next post. Thanks for the review --Ying > > > Thanks, > -Kame > > > --0015175d015e6e420204a3ab1517 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Thu, May 19, 2011 at 5:24 PM, KAMEZAW= A Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
On Thu, 19 May 2011 17:11:49 -0700
Ying Han <yingha= n@google.com> wrote:

> On Thu, May 19, 2011 at 4:51 PM, KAMEZAWA Hiroyuki <
> kamezawa.hiroyu@jp.f= ujitsu.com> wrote:
>
> > On Thu, 19 May 2011 10:32:40 -0700
> > Ying Han <yinghan@google= .com> wrote:
> >
> > > The new API exports numa_maps per-memcg basis. This is a pie= ce of useful
> > > information where it exports per-memcg page distribution acr= oss real numa
> > > nodes.
> > >
> > > One of the usecase is evaluating application performance by = combining
> > this
> > > information w/ the cpu allocation to the application.
> > >
> > > The output of the memory.numastat tries to follow w/ simiar = format of
> > numa_maps
> > > like:
> > >
> > > total=3D<total pages> N0=3D<node 0 pages> N1=3D&= lt;node 1 pages> ...
> > > file=3D<total file pages> N0=3D<node 0 pages> N1= =3D<node 1 pages> ...
> > > anon=3D<total anon pages> N0=3D<node 0 pages> N1= =3D<node 1 pages> ...
> > >
> > > $ cat /dev/cgroup/memory/memory.numa_stat
> > > total=3D246594 N0=3D18225 N1=3D72025 N2=3D26378 N3=3D129966<= br> > > > file=3D221728 N0=3D15030 N1=3D60804 N2=3D23238 N3=3D122656 > > > anon=3D21120 N0=3D2937 N1=3D7733 N2=3D3140 N3=3D7310
> > >
> >
> > Hmm ? this doesn't seem consistent....Isn't this log upda= ted ?
> >
>
> Nope. This is the V3 i posted w/ updated testing result.
>

Did you get this log while applications are running and LRU are chang= ing ?
See N1, 72505 !=3D 60804 + 7733. big error.

=
Could you clarify why total !=3D file + ano= n ?
Does the number seems consistent when the system is calm ?
=

=A0That is because the total includes "unevictable= " which is not listed here as "file" and "anon"
BTW, I wonder why unevictable is not shown...
mem_cgroup_node_nr_lru_pages() counts unevictable into it because of for_ea= ch_lru().

There are 2 ways.
=A01. show unevictable
=A02. use for_each_evictable_lru().

I vote for 1.

Sounds good to me, I can = add the "unevictable" following the "file" and "an= on" on the next post.

Thanks for the review

--Ying


Thanks,
-Kame



--0015175d015e6e420204a3ab1517-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org