From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751954AbcGUIQV (ORCPT ); Thu, 21 Jul 2016 04:16:21 -0400 Received: from outbound-smtp09.blacknight.com ([46.22.139.14]:57654 "EHLO outbound-smtp09.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751687AbcGUIQP (ORCPT ); Thu, 21 Jul 2016 04:16:15 -0400 Date: Thu, 21 Jul 2016 09:16:11 +0100 From: Mel Gorman To: Joonsoo Kim Cc: Andrew Morton , Johannes Weiner , Minchan Kim , Michal Hocko , Vlastimil Babka , Linux-MM , LKML Subject: Re: [PATCH 5/5] mm: consider per-zone inactive ratio to deactivate Message-ID: <20160721081611.GG10438@techsingularity.net> References: <1469028111-1622-1-git-send-email-mgorman@techsingularity.net> <1469028111-1622-6-git-send-email-mgorman@techsingularity.net> <20160721071050.GB27554@js1304-P5Q-DELUXE> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20160721071050.GB27554@js1304-P5Q-DELUXE> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 21, 2016 at 04:10:50PM +0900, Joonsoo Kim wrote: > > @@ -1993,6 +1994,32 @@ static bool inactive_list_is_low(struct lruvec *lruvec, bool file) > > inactive = lruvec_lru_size(lruvec, file * LRU_FILE); > > active = lruvec_lru_size(lruvec, file * LRU_FILE + LRU_ACTIVE); > > > > + /* > > + * For global reclaim on zone-constrained allocations, it is necessary > > + * to check if rotations are required for lowmem to be reclaimed. This > > + * calculates the inactive/active pages available in eligible zones. > > + */ > > + if (global_reclaim(sc)) { > > + struct pglist_data *pgdat = lruvec_pgdat(lruvec); > > + int zid; > > + > > + for (zid = sc->reclaim_idx; zid < MAX_NR_ZONES; zid++) { > > Should be changed to "zid = sc->reclaim_idx + 1" > You're right, well spotted! -- Mel Gorman SUSE Labs