Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp402565rwo; Tue, 1 Aug 2023 20:00:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlHVZEO+bpRO0VR4K1CNXHvrs6H5IkwFpYtTuLFyb9IPq5q5X3mP8fOgR/JrXYzP53lSR0pp X-Received: by 2002:a17:906:2192:b0:988:f1ec:7400 with SMTP id 18-20020a170906219200b00988f1ec7400mr3905378eju.36.1690945230858; Tue, 01 Aug 2023 20:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690945230; cv=none; d=google.com; s=arc-20160816; b=K89+Em3AYugOSk9jNYZbExa/UEoPA7BGeZFH9mXI2XMdxizNtG9qdO4kl85v04ZQOg wydSlQuf+Lx7N3EWWlP/nWc2lAoAycVbcKBx7aS90UKgqR1GM+L45d3gWwiCt1S/e4Ml V99/BBD7D7/qA511TD8E6uTsyPT9ydG16MYKj/uYd1/lvJparHy6JUR3Wi7vPgsBqEtu afCv3TurlNXgxAW7C+VyrC1hEOtpJISSKYMJXNqkJUMhzzfY1YuqbDAT4ZYTjZGuhV28 ptcLoHFHBOcb/mUtZIglS+gaFCSEUCs3wjyatj7Th92qeo535Fl//FeRHZkFBDhdYgNa PBQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=3pnJdhBwRWUq6HBnCx2cmZ1tuDZQpcYMzFaenOdYS00=; fh=nVCxlbJaEuIHWs4qgCgxmjHg/29tavQ6r8UWtr14GlE=; b=SaaPvjRX1hO1fHSbs6xm1yk4a4vGOdxpDAg0oLU74nSRjFkYaRA8IcER/c5ofkqFnq l7b2zf3Emh7/9ZcRKirApvdZWpeyiIDgu2mJscbGYC+V8AdAFrHT1dwEzjoNK8pteiTY 9G4rXqe7DoUj2ACRdlxQ1T+gs8dTVcYTvbcHfHiYyokGcRVJy7mm95yrcZ60Xdhufp31 dKskKPUp7DhJLIa+7J09x9dqkCI3S80TJJQ9XYXXoY72RR+eBHqC2GQmNZh5Zq92+2Ww bnuWweZ7vPGRahbe4sN3cx5Qr0yW9Ajtzh8X8j1HhaxtFfQ1TFcYElXptrjPOaTwo+E7 O4Fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u27-20020a1709063b9b00b0098cf69d9447si9358125ejf.820.2023.08.01.20.00.06; Tue, 01 Aug 2023 20:00:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231350AbjHBCcX (ORCPT + 99 others); Tue, 1 Aug 2023 22:32:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbjHBCcW (ORCPT ); Tue, 1 Aug 2023 22:32:22 -0400 Received: from out30-101.freemail.mail.aliyun.com (out30-101.freemail.mail.aliyun.com [115.124.30.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25BFE268C for ; Tue, 1 Aug 2023 19:32:20 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R671e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0Vot7YLG_1690943537; Received: from 30.97.48.77(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0Vot7YLG_1690943537) by smtp.aliyun-inc.com; Wed, 02 Aug 2023 10:32:18 +0800 Message-ID: <062e3adc-6d01-aa9a-8480-a4d845d4d4fe@linux.alibaba.com> Date: Wed, 2 Aug 2023 10:32:45 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 2/5] mm/compaction: set compact_cached_free_pfn correctly in update_pageblock_skip To: Kemeng Shi , linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org Cc: mgorman@techsingularity.net, willy@infradead.org, david@redhat.com References: <20230729174354.2239980-1-shikemeng@huaweicloud.com> <20230729174354.2239980-3-shikemeng@huaweicloud.com> From: Baolin Wang In-Reply-To: <20230729174354.2239980-3-shikemeng@huaweicloud.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/30/2023 1:43 AM, Kemeng Shi wrote: > We will set skip to page block of block_start_pfn, it's more reasonable > to set compact_cached_free_pfn to page block before the block_start_pfn. Looks reasonable to me. Reviewed-by: Baolin Wang > Signed-off-by: Kemeng Shi > --- > mm/compaction.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/mm/compaction.c b/mm/compaction.c > index d1d28d57e5bd..4a784872565a 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -1690,7 +1690,8 @@ static void isolate_freepages(struct compact_control *cc) > > /* Update the skip hint if the full pageblock was scanned */ > if (isolate_start_pfn >= block_end_pfn) > - update_pageblock_skip(cc, page, block_start_pfn); > + update_pageblock_skip(cc, page, block_start_pfn - > + pageblock_nr_pages); > > /* Are enough freepages isolated? */ > if (cc->nr_freepages >= cc->nr_migratepages) {