From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with ESMTP id 087458D0040 for ; Tue, 29 Mar 2011 00:55:22 -0400 (EDT) Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id p2T4tJZ7020201 for ; Mon, 28 Mar 2011 21:55:19 -0700 Received: from qwc9 (qwc9.prod.google.com [10.241.193.137]) by kpbe14.cbf.corp.google.com with ESMTP id p2T4tHqj003576 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 28 Mar 2011 21:55:17 -0700 Received: by qwc9 with SMTP id 9so3085889qwc.41 for ; Mon, 28 Mar 2011 21:55:17 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110329113259.7e0111ee.nishimura@mxp.nes.nec.co.jp> References: <1301356270-26859-1-git-send-email-yinghan@google.com> <1301356270-26859-3-git-send-email-yinghan@google.com> <20110329113259.7e0111ee.nishimura@mxp.nes.nec.co.jp> Date: Mon, 28 Mar 2011 21:55:17 -0700 Message-ID: Subject: Re: [PATCH V2 2/2] add stats to monitor soft_limit reclaim From: Ying Han Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Daisuke Nishimura Cc: KOSAKI Motohiro , KAMEZAWA Hiroyuki , Mel Gorman , Rik van Riel , Minchan Kim , Andrew Morton , linux-mm@kvack.org On Mon, Mar 28, 2011 at 7:32 PM, Daisuke Nishimura wrote: > On Mon, 28 Mar 2011 16:51:10 -0700 > Ying Han wrote: > >> The stat is added: >> >> /dev/cgroup/*/memory.stat >> soft_steal: =A0 =A0 =A0 =A0- # of pages reclaimed from soft_limit hierar= chical reclaim >> total_soft_steal: =A0- # sum of all children's "soft_steal" >> >> Change log v2...v1 >> 1. removed the counting on number of skips on shrink_zone. This is due t= o the >> change on the previous patch. >> >> Signed-off-by: Ying Han >> --- >> =A0Documentation/cgroups/memory.txt | =A0 =A02 ++ >> =A0include/linux/memcontrol.h =A0 =A0 =A0 | =A0 =A05 +++++ >> =A0mm/memcontrol.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 14 +++++++++= +++++ >> =A03 files changed, 21 insertions(+), 0 deletions(-) >> >> diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/me= mory.txt >> index b6ed61c..dcda6c5 100644 >> --- a/Documentation/cgroups/memory.txt >> +++ b/Documentation/cgroups/memory.txt >> @@ -385,6 +385,7 @@ mapped_file =A0 =A0 =A0 - # of bytes of mapped file = (includes tmpfs/shmem) >> =A0pgpgin =A0 =A0 =A0 =A0 =A0 =A0 =A0 - # of pages paged in (equivalent = to # of charging events). >> =A0pgpgout =A0 =A0 =A0 =A0 =A0 =A0 =A0- # of pages paged out (equivalent= to # of uncharging events). >> =A0swap =A0 =A0 =A0 =A0 - # of bytes of swap usage >> +soft_steal =A0 - # of pages reclaimed from global hierarchical reclaim >> =A0inactive_anon =A0 =A0 =A0 =A0- # of bytes of anonymous memory and swa= p cache memory on >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 LRU list. >> =A0active_anon =A0- # of bytes of anonymous and swap cache memory on act= ive >> @@ -406,6 +407,7 @@ total_mapped_file - sum of all children's "cache" >> =A0total_pgpgin =A0 =A0 =A0 =A0 - sum of all children's "pgpgin" >> =A0total_pgpgout =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0- sum of all children's = "pgpgout" >> =A0total_swap =A0 =A0 =A0 =A0 =A0 - sum of all children's "swap" >> +total_soft_steal =A0 =A0 - sum of all children's "soft_steal" >> =A0total_inactive_anon =A0- sum of all children's "inactive_anon" >> =A0total_active_anon =A0 =A0- sum of all children's "active_anon" >> =A0total_inactive_file =A0- sum of all children's "inactive_file" >> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h >> index 01281ac..151ab40 100644 >> --- a/include/linux/memcontrol.h >> +++ b/include/linux/memcontrol.h >> @@ -115,6 +115,7 @@ struct zone_reclaim_stat* >> =A0mem_cgroup_get_reclaim_stat_from_page(struct page *page); >> =A0extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 struct task_struct *p); >> +void mem_cgroup_soft_steal(struct mem_cgroup *memcg, int val); >> >> =A0#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP >> =A0extern int do_swap_account; >> @@ -356,6 +357,10 @@ static inline void mem_cgroup_split_huge_fixup(stru= ct page *head, >> =A0{ >> =A0} >> >> +static inline void mem_cgroup_soft_steal(struct mem_cgroup *memcg, >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0int val) >> +{ >> +} >> =A0#endif /* CONFIG_CGROUP_MEM_CONT */ >> > Do you use this function outside of memcontrol.c in future, right ? > I'm asking just for clarification, and I'm sorry if I miss some past disc= ussions. No, you didn't miss the discussion. That is a reasonable change. thanks --Ying > > Thanks, > Daisuke Nishimura. > -- 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