Messages in this thread | | | Date | Mon, 16 May 2011 15:36:07 -0700 | From | Andrew Morton <> | 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@cmpxchg.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).
| |