From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f71.google.com (mail-lf0-f71.google.com [209.85.215.71]) by kanga.kvack.org (Postfix) with ESMTP id DD49C828E1 for ; Thu, 23 Jun 2016 07:13:22 -0400 (EDT) Received: by mail-lf0-f71.google.com with SMTP id a4so51764838lfa.1 for ; Thu, 23 Jun 2016 04:13:22 -0700 (PDT) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com. [74.125.82.48]) by mx.google.com with ESMTPS id f123si5842365wmd.23.2016.06.23.04.13.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 04:13:21 -0700 (PDT) Received: by mail-wm0-f48.google.com with SMTP id a66so44901190wme.0 for ; Thu, 23 Jun 2016 04:13:21 -0700 (PDT) Date: Thu, 23 Jun 2016 13:13:20 +0200 From: Michal Hocko Subject: Re: [PATCH 04/27] mm, vmscan: Begin reclaiming pages on a per-node basis Message-ID: <20160623111319.GD30077@dhcp22.suse.cz> 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> <20160623110728.GT1868@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160623110728.GT1868@techsingularity.net> Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: Vlastimil Babka , Andrew Morton , Linux-MM , Rik van Riel , Johannes Weiner , LKML On Thu 23-06-16 12:07:28, Mel Gorman wrote: > 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--; Yes that makes much more sense to me. -- Michal Hocko SUSE Labs -- 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/ . Don't email: email@kvack.org