Re: [RFC][PATCH 6/7][memcg] generic file status update

From: KAMEZAWA Hiroyuki
Date: Wed Jul 28 2010 - 03:19:24 EST


On Wed, 28 Jul 2010 00:12:13 -0700
Greg Thelen <gthelen@xxxxxxxxxx> wrote:

> KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> writes:
>
> > This patch itself is not important. I just feel we need this kind of
> > clean up in future.
> >
> > ==
> > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> >
> > Preparing for adding new status arounf file caches.(dirty, writeback,etc..)
> > Using a unified macro and more generic names.
> > All counters will have the same rule for updating.
> >
> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> > ---
> > include/linux/memcontrol.h | 10 +++++++---
> > include/linux/page_cgroup.h | 21 +++++++++++++++------
> > mm/memcontrol.c | 27 +++++++++++++++++----------
> > mm/rmap.c | 4 ++--
> > 4 files changed, 41 insertions(+), 21 deletions(-)
> >
> > Index: mmotm-0719/include/linux/memcontrol.h
> > ===================================================================
> > --- mmotm-0719.orig/include/linux/memcontrol.h
> > +++ mmotm-0719/include/linux/memcontrol.h
> > @@ -121,7 +121,11 @@ static inline bool mem_cgroup_disabled(v
> > return false;
> > }
> >
> > -void mem_cgroup_update_file_mapped(struct page *page, int val);
> > +enum {
> > + __MEMCG_FILE_MAPPED,
> > + NR_MEMCG_FILE_STAT
> > +};
>
> These two stat values need to be defined outside of "#if
> CONFIG_CGROUP_MEM_RES_CTLR" (above) to allow for rmap.c to allow for the
> following (from rmap.c) when memcg is not compiled in:
> mem_cgroup_update_file_stat(page, __MEMCG_FILE_MAPPED, 1);
>

ok. or I'll not remove mem_cgroup_update_file_mapped().



> > +void mem_cgroup_update_file_stat(struct page *page, int stat, int val);
> > unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order,
> > gfp_t gfp_mask, int nid,
> > int zid);
> > @@ -292,8 +296,8 @@ mem_cgroup_print_oom_info(struct mem_cgr
> > {
> > }
> >
> > -static inline void mem_cgroup_update_file_mapped(struct page *page,
> > - int val)
> > +static inline void
> > +mem_cgroup_update_file_stat(struct page *page, int stat, int val);
>
> Trailing ';' needs to be removed.
>
ok, will do.

Bye.
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/