From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758343AbcFAPTb (ORCPT ); Wed, 1 Jun 2016 11:19:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:36052 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751570AbcFAPTa (ORCPT ); Wed, 1 Jun 2016 11:19:30 -0400 Subject: Re: [PATCH v2 18/18] mm, vmscan: use proper classzone_idx in should_continue_reclaim() To: Michal Hocko References: <20160531130818.28724-1-vbabka@suse.cz> <20160531130818.28724-19-vbabka@suse.cz> <20160601142138.GX26601@dhcp22.suse.cz> Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mel Gorman , Joonsoo Kim , David Rientjes , Rik van Riel From: Vlastimil Babka Message-ID: <574EFCFE.1000903@suse.cz> Date: Wed, 1 Jun 2016 17:19:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <20160601142138.GX26601@dhcp22.suse.cz> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/01/2016 04:21 PM, Michal Hocko wrote: > On Tue 31-05-16 15:08:18, Vlastimil Babka wrote: > [...] >> @@ -2364,11 +2350,12 @@ static inline bool should_continue_reclaim(struct zone *zone, >> } >> >> static bool shrink_zone(struct zone *zone, struct scan_control *sc, >> - bool is_classzone) >> + int classzone_idx) >> { >> struct reclaim_state *reclaim_state = current->reclaim_state; >> unsigned long nr_reclaimed, nr_scanned; >> bool reclaimable = false; >> + bool is_classzone = (classzone_idx == zone_idx(zone)); >> >> do { >> struct mem_cgroup *root = sc->target_mem_cgroup; >> @@ -2450,7 +2437,7 @@ static bool shrink_zone(struct zone *zone, struct scan_control *sc, >> reclaimable = true; >> >> } while (should_continue_reclaim(zone, sc->nr_reclaimed - nr_reclaimed, >> - sc->nr_scanned - nr_scanned, sc)); >> + sc->nr_scanned - nr_scanned, sc, classzone_idx)); >> >> return reclaimable; >> } >> @@ -2580,7 +2567,7 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc) >> /* need some check for avoid more shrink_zone() */ >> } >> >> - shrink_zone(zone, sc, zone_idx(zone) == classzone_idx); >> + shrink_zone(zone, sc, classzone_idx); > > this should be is_classzone, right? No, this is shrink_zones() context, not shrink_zone().