[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120708230100.GA5340@cmpxchg.org>
Date: Mon, 9 Jul 2012 01:01:00 +0200
From: Johannes Weiner <hannes@...xchg.org>
To: Fengguang Wu <fengguang.wu@...el.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Sha Zhengju <handai.szj@...il.com>, linux-mm@...ck.org,
cgroups@...r.kernel.org, gthelen@...gle.com, yinghan@...gle.com,
akpm@...ux-foundation.org, mhocko@...e.cz,
linux-kernel@...r.kernel.org, Sha Zhengju <handai.szj@...bao.com>
Subject: Re: [PATCH 6/7] memcg: add per cgroup writeback pages accounting
On Sun, Jul 08, 2012 at 10:44:59PM +0800, Fengguang Wu wrote:
> On Tue, Jul 03, 2012 at 03:31:26PM +0900, KAMEZAWA Hiroyuki wrote:
> > (2012/06/28 20:05), Sha Zhengju wrote:
> > > From: Sha Zhengju <handai.szj@...bao.com>
> > >
> > > Similar to dirty page, we add per cgroup writeback pages accounting. The lock
> > > rule still is:
> > > mem_cgroup_begin_update_page_stat()
> > > modify page WRITEBACK stat
> > > mem_cgroup_update_page_stat()
> > > mem_cgroup_end_update_page_stat()
> > >
> > > There're two writeback interface to modify: test_clear/set_page_writeback.
> > >
> > > Signed-off-by: Sha Zhengju <handai.szj@...bao.com>
> >
> > Seems good to me. BTW, you named macros as MEM_CGROUP_STAT_FILE_XXX
> > but I wonder these counters will be used for accounting swap-out's dirty pages..
> >
> > STAT_DIRTY, STAT_WRITEBACK ? do you have better name ?
>
> Perhaps we can follow the established "enum zone_stat_item" names:
>
> NR_FILE_DIRTY,
> NR_WRITEBACK,
>
> s/NR_/MEM_CGROUP_STAT_/
>
> The names indicate that dirty pages for anonymous pages are not
> accounted (by __set_page_dirty_no_writeback()). While the writeback
> pages accounting include both the file/anon pages.
>
> Ah then we'll need to update the document in patch 0 accordingly. This
> may sound a bit tricky to the users..
We already report the global one as "nr_dirty", though. Please don't
give the memcg one a different name.
The enum naming is not too critical, but it would be nice to have it
match the public name.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists