Re: [patch 2/2] mm: memcg: count pte references from every member of the reclaimed hierarchy

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

 



On Wed, 29 Feb 2012 03:02:46 +0100
Johannes Weiner <hannes@xxxxxxxxxxx> wrote:

> On Wed, Feb 29, 2012 at 09:39:46AM +0900, KAMEZAWA Hiroyuki wrote:
> > On Tue, 28 Feb 2012 15:14:49 +0100
> > Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
> > > --- a/mm/vmscan.c
> > > +++ b/mm/vmscan.c
> > > @@ -708,7 +708,8 @@ static enum page_references page_check_references(struct page *page,
> > >  	int referenced_ptes, referenced_page;
> > >  	unsigned long vm_flags;
> > >  
> > > -	referenced_ptes = page_referenced(page, 1, mz->mem_cgroup, &vm_flags);
> > > +	referenced_ptes = page_referenced(page, 1, sc->target_mem_cgroup,
> > > +					  &vm_flags);
> > 
> > 
> > I'm sorry if I don't understand the codes... !sc->target_mem_cgroup case is handled ?
> 
> Yes, but it's not obvious from the diff alone.  page_referenced() does
> this:
> 
> 		/*
> 		 * If we are reclaiming on behalf of a cgroup, skip
> 		 * counting on behalf of references from different
> 		 * cgroups
> 		 */
> 		if (memcg && !mm_match_cgroup(vma->vm_mm, memcg))
> 			continue;
> 
> As a result, !sc->target_mem_cgroup -- global reclaim -- will never
> ignore references, or put differently, respect references from all
> memcgs, which is what we want.
> 
Ah, thank you. 

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>

--
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]