From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH 11/11] memcg: show reclaim_stat
Date: Wed, 3 Dec 2008 19:49:32 +0530 [thread overview]
Message-ID: <20081203141931.GH17701@balbir.in.ibm.com> (raw)
In-Reply-To: <20081202180525.2023892c.kamezawa.hiroyu@jp.fujitsu.com>
* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2008-12-02 18:05:25]:
> On Mon, 1 Dec 2008 21:19:49 +0900 (JST)
> KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
>
> > added following four field to memory.stat file.
> >
> > - recent_rotated_anon
> > - recent_rotated_file
> > - recent_scanned_anon
> > - recent_scanned_file
> >
> > it is useful for memcg reclaim debugging.
> >
> I'll put this under CONFIG_DEBUG_VM.
>
I think they'll be useful even outside for tasks that need to take
decisions, it will be nice to see what sort of reclaim is going on. I
would like to see them outside, there is no cost associated with them
and assuming we'll not change the LRU logic very frequently, we don't
need to be afraid of breaking ABI either :)
> Thanks,
> -Kame
>
> >
> > Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > ---
> > mm/memcontrol.c | 25 +++++++++++++++++++++++++
> > 1 file changed, 25 insertions(+)
> >
> > Index: b/mm/memcontrol.c
> > ===================================================================
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -1799,6 +1799,31 @@ static int mem_control_stat_show(struct
> >
> > cb->fill(cb, "inactive_ratio", mem_cont->inactive_ratio);
> >
> > + {
> > + int nid, zid;
> > + struct mem_cgroup_per_zone *mz;
> > + unsigned long recent_rotated[2] = {0, 0};
> > + unsigned long recent_scanned[2] = {0, 0};
> > +
> > + for_each_online_node(nid)
> > + for (zid = 0; zid < MAX_NR_ZONES; zid++) {
> > + mz = mem_cgroup_zoneinfo(mem_cont, nid, zid);
> > +
> > + recent_rotated[0] +=
> > + mz->reclaim_stat.recent_rotated[0];
> > + recent_rotated[1] +=
> > + mz->reclaim_stat.recent_rotated[1];
> > + recent_scanned[0] +=
> > + mz->reclaim_stat.recent_scanned[0];
> > + recent_scanned[1] +=
> > + mz->reclaim_stat.recent_scanned[1];
> > + }
> > + cb->fill(cb, "recent_rotated_anon", recent_rotated[0]);
> > + cb->fill(cb, "recent_rotated_file", recent_rotated[1]);
> > + cb->fill(cb, "recent_scanned_anon", recent_scanned[0]);
> > + cb->fill(cb, "recent_scanned_file", recent_scanned[1]);
> > + }
> > +
> > return 0;
> > }
> >
> >
> >
> > --
> > 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/ .
> > Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
> >
>
--
Balbir
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-12-03 14:19 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-01 12:10 [PATCH 00/11] memcg: split-lru feature for memcg take2 KOSAKI Motohiro
2008-12-01 12:11 ` [PATCH 01/11] inactive_anon_is_low() move to vmscan.c KOSAKI Motohiro
2008-12-01 12:12 ` [PATCH 02/11] introduce zone_reclaim struct KOSAKI Motohiro
2008-12-01 12:13 ` [PATCH 03/11] make zone_nr_pages() helper function KOSAKI Motohiro
2008-12-01 12:14 ` [PATCH 04/11] make get_scan_ratio() to memcg safe KOSAKI Motohiro
2008-12-01 14:50 ` Rik van Riel
2008-12-01 12:14 ` [PATCH 05/11] memcg: add null check to page_cgroup_zoneinfo() KOSAKI Motohiro
2008-12-01 14:52 ` Rik van Riel
2008-12-01 12:15 ` [PATCH 06/11] memcg: make inactive_anon_is_low() KOSAKI Motohiro
2008-12-03 13:52 ` Balbir Singh
2008-12-04 6:14 ` KOSAKI Motohiro
2008-12-01 12:16 ` [PATCH 07/11] memcg: make mem_cgroup_zone_nr_pages() KOSAKI Motohiro
2008-12-01 16:31 ` Rik van Riel
2008-12-03 13:58 ` Balbir Singh
2008-12-01 12:17 ` [PATCH 08/11] memcg: make zone_reclaim_stat KOSAKI Motohiro
2008-12-01 16:33 ` Rik van Riel
2008-12-03 14:06 ` Balbir Singh
2008-12-04 7:15 ` KOSAKI Motohiro
2008-12-01 12:18 ` [PATCH 09/11] memcg: remove mem_cgroup_calc_reclaim() KOSAKI Motohiro
2008-12-01 17:09 ` Rik van Riel
2008-12-01 12:19 ` [PATCH 10/11] memcg: show inactive_ratio KOSAKI Motohiro
2008-12-01 17:10 ` Rik van Riel
2008-12-02 9:05 ` KAMEZAWA Hiroyuki
2008-12-01 12:19 ` [PATCH 11/11] memcg: show reclaim_stat KOSAKI Motohiro
2008-12-01 17:11 ` Rik van Riel
2008-12-02 9:05 ` KAMEZAWA Hiroyuki
2008-12-03 14:19 ` Balbir Singh [this message]
2008-12-03 16:15 ` KAMEZAWA Hiroyuki
2008-12-02 4:25 ` [PATCH 00/11] memcg: split-lru feature for memcg take2 KAMEZAWA Hiroyuki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081203141931.GH17701@balbir.in.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox