[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110516153607.49d4dc41.akpm@linux-foundation.org>
Date: Mon, 16 May 2011 15:36:07 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Johannes Weiner <hannes@...xchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
Balbir Singh <balbir@...ux.vnet.ibm.com>,
Ying Han <yinghan@...gle.com>, Michal Hocko <mhocko@...e.cz>,
Rik van Riel <riel@...hat.com>,
Minchan Kim <minchan.kim@...il.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Mel Gorman <mgorman@...e.de>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [rfc patch 2/6] vmscan: make distinction between memcg reclaim
and LRU list selection
On Fri, 13 May 2011 08:58:54 +0200
Johannes Weiner <hannes@...xchg.org> wrote:
> > > @@ -154,16 +158,24 @@ static LIST_HEAD(shrinker_list);
> > > static DECLARE_RWSEM(shrinker_rwsem);
> > >
> > > #ifdef CONFIG_CGROUP_MEM_RES_CTLR
> > > -#define scanning_global_lru(sc) (!(sc)->mem_cgroup)
> > > +static bool global_reclaim(struct scan_control *sc)
> > > +{
> > > + return !sc->memcg;
> > > +}
> > > +static bool scanning_global_lru(struct scan_control *sc)
> > > +{
> > > + return !sc->current_memcg;
> > > +}
> >
> >
> > Could you add comments ?
oy, that's my job.
> Yes, I will.
> +static bool global_reclaim(struct scan_control *sc) { return 1; }
> +static bool scanning_global_lru(struct scan_control *sc) { return 1; }
s/1/true/
And we may as well format the functions properly?
And it would be nice for the names of the functions to identify what
subsystem they belong to: memcg_global_reclaim() or such. Although
that's already been a bit messed up in memcg (and in the VM generally).
--
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