From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753080Ab1H2IAJ (ORCPT ); Mon, 29 Aug 2011 04:00:09 -0400 Received: from zene.cmpxchg.org ([85.214.230.12]:48776 "EHLO zene.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753026Ab1H2IAE (ORCPT ); Mon, 29 Aug 2011 04:00:04 -0400 Date: Mon, 29 Aug 2011 09:59:41 +0200 From: Johannes Weiner To: Ying Han Cc: KAMEZAWA Hiroyuki , Daisuke Nishimura , Balbir Singh , Michal Hocko , Andrew Morton , Rik van Riel , Minchan Kim , KOSAKI Motohiro , Mel Gorman , Greg Thelen , Michel Lespinasse , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Hugh Dickins Subject: Re: [patch 7/8] vmscan: memcg-aware unevictable page rescue scanner Message-ID: <20110829075941.GB32114@cmpxchg.org> References: <1306909519-7286-1-git-send-email-hannes@cmpxchg.org> <1306909519-7286-8-git-send-email-hannes@cmpxchg.org> <20110720003653.GA667@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 29, 2011 at 12:28:22AM -0700, Ying Han wrote: > On Tue, Jul 19, 2011 at 5:36 PM, Johannes Weiner wrote: > > On Tue, Jul 19, 2011 at 03:47:43PM -0700, Ying Han wrote: > >> On Tue, May 31, 2011 at 11:25 PM, Johannes Weiner wrote: > >> > >> > Once the per-memcg lru lists are exclusive, the unevictable page > >> > rescue scanner can no longer work on the global zone lru lists. > >> > > >> > This converts it to go through all memcgs and scan their respective > >> > unevictable lists instead. > >> > > >> > Signed-off-by: Johannes Weiner > >> > --- > >> >  include/linux/memcontrol.h |    2 + > >> >  mm/memcontrol.c            |   11 +++++++++ > >> >  mm/vmscan.c                |   53 > >> > +++++++++++++++++++++++++++---------------- > >> >  3 files changed, 46 insertions(+), 20 deletions(-) > >> > > >> > diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h > >> > index cb02c00..56c1def 100644 > >> > --- a/include/linux/memcontrol.h > >> > +++ b/include/linux/memcontrol.h > >> > @@ -60,6 +60,8 @@ extern void mem_cgroup_cancel_charge_swapin(struct > >> > mem_cgroup *ptr); > >> > > >> >  extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct > >> > *mm, > >> >                                        gfp_t gfp_mask); > >> > +struct page *mem_cgroup_lru_to_page(struct zone *, struct mem_cgroup *, > >> > +                                   enum lru_list); > >> > > >> > >> Did we miss a #ifdef case for this function? I got compile error by > >> disabling memcg. > > > > I assume it's because the call to it is not optimized away properly in > > the disabled case.  I'll have it fixed in the next round, thanks for > > letting me know. > > > > Hi Johannes: > > This is the change for the hierarchy_walk() sent on the other patch, > also including a fix. Please consider to fold in your patch: > > Fix the hierarchy_walk() in the unevictable page rescue scanner > > the patch including changes > 1. adjust the change in hierarchy_walk() which needs to hold the reference to > the first mem_cgroup. > 2. add stop_hierarchy_walk() at the end which is missed on the original patch. > > Signed-off-by: Ying Han > > Change-Id: I72fb5d351faf0f111c8c99edd90b6cfee6281d3f > --- > mm/memcontrol.c | 3 +++ > mm/vmscan.c | 7 ++++--- > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index 9bcd429..426092b 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -1514,6 +1514,9 @@ void mem_cgroup_stop_hierarchy_walk(struct > mem_cgroup *target, > >------>------->------->------- struct mem_cgroup *first, > >------>------->------->------- struct mem_cgroup *mem) > { > +>------if (!target) > +>------>-------target = root_mem_cgroup; This is important and I have it already in my tree. After the changes to the iteration process as explained in my previous email, I don't think the rest of this patch is necessary. Can you confirm? Thanks!