From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751832AbcFWLHe (ORCPT ); Thu, 23 Jun 2016 07:07:34 -0400 Received: from outbound-smtp03.blacknight.com ([81.17.249.16]:33010 "EHLO outbound-smtp03.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751654AbcFWLHd (ORCPT ); Thu, 23 Jun 2016 07:07:33 -0400 Date: Thu, 23 Jun 2016 12:07:28 +0100 From: Mel Gorman To: Vlastimil Babka Cc: Andrew Morton , Linux-MM , Rik van Riel , Johannes Weiner , LKML , Michal Hocko Subject: Re: [PATCH 04/27] mm, vmscan: Begin reclaiming pages on a per-node basis Message-ID: <20160623110728.GT1868@techsingularity.net> References: <1466518566-30034-1-git-send-email-mgorman@techsingularity.net> <1466518566-30034-5-git-send-email-mgorman@techsingularity.net> <6eecdf50-7880-2bfe-5519-004a4beeece6@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: 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 Wed, Jun 22, 2016 at 06:00:12PM +0200, Vlastimil Babka wrote: > >>- enum zone_type classzone_idx; > >>- > >> if (!populated_zone(zone)) > >> continue; > >> > >>- classzone_idx = requested_highidx; > >>+ /* > >>+ * Note that reclaim_idx does not change as it is the highest > >>+ * zone reclaimed from which for empty zones is a no-op but > >>+ * classzone_idx is used by shrink_node to test if the slabs > >>+ * should be shrunk on a given node. > >>+ */ > >> while (!populated_zone(zone->zone_pgdat->node_zones + > >>- classzone_idx)) > >>+ classzone_idx)) { > >> classzone_idx--; > >>+ continue; > > Oh and Michal's comment on Patch 20 made me realize that my objection to v6 > about possible underflow of sc->reclaim_idx and classzone_idx seems to still > apply here for classzone_idx? Potentially. The relevant code now looks like this classzone_idx = sc->reclaim_idx; while (!populated_zone(zone->zone_pgdat->node_zones + classzone_idx)) classzone_idx--; -- Mel Gorman SUSE Labs