Re: [patch 2/2] mm: memcg: count pte references from every member of the reclaimed hierarchy
From: Johannes Weiner <hannes@cmpxchg.org>
Date: 2012-02-29 02:03:08
Also in:
lkml
From: Johannes Weiner <hannes@cmpxchg.org>
Date: 2012-02-29 02:03:08
Also in:
lkml
On Wed, Feb 29, 2012 at 09:39:46AM +0900, KAMEZAWA Hiroyuki wrote:
On Tue, 28 Feb 2012 15:14:49 +0100 Johannes Weiner [off-list ref] wrote:quoted
--- 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. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. 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@kvack.org"> email@kvack.org </a>