Re: [patch 08/11] mm: vmscan: convert global reclaim to per-memcg LRU lists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 21-09-11 15:51:43, Johannes Weiner wrote:
> On Wed, Sep 21, 2011 at 03:10:45PM +0200, Michal Hocko wrote:
> > On Mon 12-09-11 12:57:25, Johannes Weiner wrote:
[...]
> > > @@ -2451,13 +2445,24 @@ unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem_cont,
> > >  static void age_active_anon(struct zone *zone, struct scan_control *sc,
> > >  			    int priority)
> > >  {
> > > -	struct mem_cgroup_zone mz = {
> > > -		.mem_cgroup = NULL,
> > > -		.zone = zone,
> > > -	};
> > > +	struct mem_cgroup *mem;
> > > +
> > > +	if (!total_swap_pages)
> > > +		return;
> > > +
> > > +	mem = mem_cgroup_iter(NULL, NULL, NULL);
> > 
> > Wouldn't be for_each_mem_cgroup more appropriate? Macro is not exported
> > but probably worth exporting? The same applies for
> > scan_zone_unevictable_pages from the previous patch.
> 
> Unfortunately, in generic code, these loops need to be layed out like
> this for !CONFIG_MEMCG to do the right thing.  mem_cgroup_iter() will
> return NULL and the loop has to execute exactly once.

Ahh, right you are. I have missed that.

> 
> This is something that will go away once we implement Christoph's
> suggestion of always having a (skeleton) root_mem_cgroup around, even
> for !CONFIG_MEMCG.

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]