Re: [rfc patch 2/6] vmscan: make distinction between memcg reclaimand LRU list selection

From: Andrew Morton
Date: Mon May 16 2011 - 18:36:41 EST


On Fri, 13 May 2011 08:58:54 +0200
Johannes Weiner <hannes@xxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/