Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3554683pxu; Mon, 19 Oct 2020 15:20:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWSyX0LWMdrikZJ8tTbwk2XD5Blww5B2rWCtqOy6q6siNr+axciCy1aRb6PXc+O9Iayy4P X-Received: by 2002:a17:906:791:: with SMTP id l17mr1956141ejc.361.1603146048283; Mon, 19 Oct 2020 15:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603146048; cv=none; d=google.com; s=arc-20160816; b=jkgl0MCE7BAwFOg5qoplGrKd5fQtNyqmqYBO+d3XrmmTCl+UhCDRN/g7qic2sp7Ky8 T2JNCkwc5XeIN63aIpHBU3tl/GHg2Zaj/wN+eJvSMVGI5rpH1XdBsKjONxNDVmu7R8e+ 5QG6RFiJpCPNxu23FfCCCKyQ4uyO5Nn63qMXuqGjrKs8BObD3ya4G8NG6WRhblGwdDCt uoWo7p6CF4X5/BZ8UDVuSi/MByoNg40gbu9vwp8FKyQ5qC2aKwveXon1uY0gc2kB6QiG ZHjdU7A1deugPAVbjnuqRgg0FEn9p6Tn4UdLPe+oo6t69+An7/rU0IR5bj0fOtY3u7/x 9BEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Bidgq3794/6027mLl9O0ok2JaRoIkPc81bjRqvpkwJ8=; b=YfNnItsuNCAs9iFR7ZRmE1jVjhOCzt8nWC/vT349D1vsaAXB4zSxBwUxa3jz9XXLhg jJtiIaIn0q7eVGk/dMQ5ArHN+CmfIXdZdhHlowHTub9zxAW7JvFw52mRCIOx9X6RE8Sq OmNWEmPi2iHoewf1tiodp7aJC4mD8KD4KZ803B6a+ttM84qW83Ep87SYoREj84qK/E1G hyIGUd6F7pbRFHCbE6S0hDY5sa6tXw6OanPyhdRLDT+kzWt8KwbJ0aotq8b/1CGjwqb2 ZO4n23zkPdFQDkuU5FoPsHd4+iwNlCb04zs6Zd+Pyy1oOw+NNmiDvPtjvJQoxVDODPD7 CwEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i13si739652edx.106.2020.10.19.15.20.25; Mon, 19 Oct 2020 15:20:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730439AbgJSJkK (ORCPT + 99 others); Mon, 19 Oct 2020 05:40:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:33084 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727556AbgJSJkK (ORCPT ); Mon, 19 Oct 2020 05:40:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5452AB1E1; Mon, 19 Oct 2020 09:40:08 +0000 (UTC) Subject: Re: [PATCH v2] mm/compaction: Rename 'start_pfn' to 'iteration_start_pfn' in compact_zone() To: yanfei.xu@windriver.com, akpm@linux-foundation.org, david@redhat.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20201019083632.25417-1-yanfei.xu@windriver.com> From: Vlastimil Babka Message-ID: <57730b8a-f5d7-d6c7-3961-3fa95701aba5@suse.cz> Date: Mon, 19 Oct 2020 11:40:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 MIME-Version: 1.0 In-Reply-To: <20201019083632.25417-1-yanfei.xu@windriver.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/19/20 10:36 AM, yanfei.xu@windriver.com wrote: > From: Yanfei Xu > > There are two 'start_pfn' declared in compact_zone() which have > different meaning. Rename the second one to 'iteration_start_pfn' > to prevent trace_mm_compaction_end() from tracing an undesirable > value. "to prevent confusion.", because trace_mm_compaction_end() has the correct value even before the patch - the second start_pfn is out of scope at that point. Thanks > BTW, remove an useless semicolon. > > Acked-by: David Hildenbrand > Acked-by: Vlastimil Babka > Signed-off-by: Yanfei Xu > --- > v1->v2: > Rename 'start_pfn' to 'iteration_start_pfn' and change commit messages. > > mm/compaction.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/mm/compaction.c b/mm/compaction.c > index 176dcded298e..ccd27c739fd6 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -2272,7 +2272,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc) > > while ((ret = compact_finished(cc)) == COMPACT_CONTINUE) { > int err; > - unsigned long start_pfn = cc->migrate_pfn; > + unsigned long iteration_start_pfn = cc->migrate_pfn; > > /* > * Avoid multiple rescans which can happen if a page cannot be > @@ -2284,7 +2284,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc) > */ > cc->rescan = false; > if (pageblock_start_pfn(last_migrated_pfn) == > - pageblock_start_pfn(start_pfn)) { > + pageblock_start_pfn(iteration_start_pfn)) { > cc->rescan = true; > } > > @@ -2308,8 +2308,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc) > goto check_drain; > case ISOLATE_SUCCESS: > update_cached = false; > - last_migrated_pfn = start_pfn; > - ; > + last_migrated_pfn = iteration_start_pfn; > } > > err = migrate_pages(&cc->migratepages, compaction_alloc, >