Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5244647ybh; Wed, 7 Aug 2019 03:07:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5Wdi68vUWt2xyJxt8VDb/dFHUPscpFmmQcoy3+juXP3aqugjhXX7QdV7Pm93zKt6FIC5y X-Received: by 2002:a17:902:ba8f:: with SMTP id k15mr2166905pls.38.1565172438643; Wed, 07 Aug 2019 03:07:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565172438; cv=none; d=google.com; s=arc-20160816; b=Ej2eqi1WqYE5jK5d3CyQPXyQTSiJIVyxiXC4yFZmGlSRMRGEhbgIuG0rNd/i1OwRGQ 8cdBdw6V9PV5/WE/veoA+WUM+G2Q4fvuaoynh5a3wQUqV9s6HU28F6yDwkSVRiGwQh2D aMQtMUi/YLOk1yl9AXdJgyRRL5dEW1tTxBCfRpoOPqKDbPSm3ipCqk9ck0s1+5fXUEJu o3QHT/eR2rchC0dMCBzkKXnzkQgNAFE//EYYySnymoANPLGDm7MYrftUzXWwLceM3QAs dPBrV5UpbD4yaVg9kcX8rXOojo+RQ5QC/XKAS6GE12Gh0T2U+9HOQ6948GTHm/hdADBk 9TEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=xNh67J09UClLaXZNUq/U9zrE2IHPqKErv+9PvHvj8ic=; b=DBTTS+/exKO0j8xNBf+d4Q9Zy9ogihI8PQPABKPtd2pgEnGTLH7KhQlPzvQ4846f8q yhjx9UC426phbTgiFC1t3GkeCsEvbcNjU1bHyjisETizYvARwvqlrjPotmvVArFlFY0N AzNdAllrJXr7QqXw14wq1KlkHXHS+DISusd+P+DUSN/TQr3YvYwM2Lz55RflWDjioiP7 bTWRCljroIlrutCHfT1qoewyU5PrY2PSgdM0kBPyLpcziBJ5cpgp3GtquCfIPlRY4YOc ZWg/K3UcE67jM82rRx1oSYxgNjKV5efmUTkBmInPnIkkh3q2Vuc5YtrWtEt1voObNu3p TVXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v97si16651515pjb.23.2019.08.07.03.07.01; Wed, 07 Aug 2019 03:07:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729416AbfHGKEq (ORCPT + 99 others); Wed, 7 Aug 2019 06:04:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:51040 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728138AbfHGKEp (ORCPT ); Wed, 7 Aug 2019 06:04:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7D95DAD20; Wed, 7 Aug 2019 10:04:44 +0000 (UTC) Subject: Re: [PATCH] mm/compaction: remove unnecessary zone parameter in isolate_migratepages() To: Pengfei Li , akpm@linux-foundation.org Cc: mgorman@techsingularity.net, cai@lca.pw, aryabinin@virtuozzo.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20190806151616.21107-1-lpf.vector@gmail.com> From: Vlastimil Babka Message-ID: <5d07663b-3915-b6a4-4886-fc78dc3ef209@suse.cz> Date: Wed, 7 Aug 2019 12:04:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190806151616.21107-1-lpf.vector@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/6/19 5:16 PM, Pengfei Li wrote: > Like commit 40cacbcb3240 ("mm, compaction: remove unnecessary zone > parameter in some instances"), remove unnecessary zone parameter. > > No functional change. > > Signed-off-by: Pengfei Li Acked-by: Vlastimil Babka > --- > mm/compaction.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/mm/compaction.c b/mm/compaction.c > index 952dc2fb24e5..685c3e3d0a0f 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -1737,8 +1737,7 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc) > * starting at the block pointed to by the migrate scanner pfn within > * compact_control. > */ > -static isolate_migrate_t isolate_migratepages(struct zone *zone, > - struct compact_control *cc) > +static isolate_migrate_t isolate_migratepages(struct compact_control *cc) > { > unsigned long block_start_pfn; > unsigned long block_end_pfn; > @@ -1756,8 +1755,8 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone, > */ > low_pfn = fast_find_migrateblock(cc); > block_start_pfn = pageblock_start_pfn(low_pfn); > - if (block_start_pfn < zone->zone_start_pfn) > - block_start_pfn = zone->zone_start_pfn; > + if (block_start_pfn < cc->zone->zone_start_pfn) > + block_start_pfn = cc->zone->zone_start_pfn; > > /* > * fast_find_migrateblock marks a pageblock skipped so to avoid > @@ -1787,8 +1786,8 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone, > if (!(low_pfn % (SWAP_CLUSTER_MAX * pageblock_nr_pages))) > cond_resched(); > > - page = pageblock_pfn_to_page(block_start_pfn, block_end_pfn, > - zone); > + page = pageblock_pfn_to_page(block_start_pfn, > + block_end_pfn, cc->zone); > if (!page) > continue; > > @@ -2158,7 +2157,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc) > cc->rescan = true; > } > > - switch (isolate_migratepages(cc->zone, cc)) { > + switch (isolate_migratepages(cc)) { > case ISOLATE_ABORT: > ret = COMPACT_CONTENDED; > putback_movable_pages(&cc->migratepages); >