[v3,4/8] mm/compaction: correct comment of fast_find_migrateblock in isolate_migratepages
Message ID | 20230804110454.2935878-5-shikemeng@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:419:b0:139:fa0d:b2d with SMTP id 25csp771439rwd; Thu, 3 Aug 2023 20:31:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlEhMwvTOeQ2ZVd4wdY1vrFaM+vDMedPvv3g5nuGHKnbK2BZVGH/UaGwnZ6vJ2smulL9UDRq X-Received: by 2002:a17:906:196:b0:993:d0e1:f308 with SMTP id 22-20020a170906019600b00993d0e1f308mr15213596ejb.2.1691119918559; Thu, 03 Aug 2023 20:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691119918; cv=none; d=google.com; s=arc-20160816; b=l+1Q6JeqK6f73vuROKDfXQUgKoOyqOGad0uCcRZO2xiQLzGjSemyP+Of58tmLsMS/u ErnAX66p+wXT33nkFBKRvMgPcm65qvUuaFjC9mp0V9mamqdAMImAantyVWCnV/kQsiXI /+VYCgpICu9XpjF1BiMPLmEE9UwcQrlbJq5Tj9vFNdNvKKg8Zw3yQbd4/ZI040nMWBym SO7GPJIC0oRBYmcukhtjSmqSXpSRgnUl0kQsKO5oLVu727whsK6jf5pT541GR3nqGn7A CoTpPG3uQ6d3GAdyXZQ56RkyEnn+V70vg2EW47I43ZkHOiYKfvZH+/WECP8ySjzmZZaR 4IHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rskdlnzcT8oAIsMut4xbyGOKCRXz3TQRkhifY3ziyhY=; fh=zpCCF/J8Z0sUUNZfCNdnaRvm94yhXPVxl9PzV22VU6k=; b=rN8xruendrD4XebeTgV1mvPKdC4UQdk3R5xSQ7OMpiafUHkx85G1XEoOSxKGJvXIrE A1Pv7xDd7sbMa/z6SO1BylSX4toWd1zAC1YehyOttDOLgPW4PVBbSQ4SLMwUmUZP9CTi W5/qKTSyQCwHXiYSmaUbl0bfczPKCDkzhVy85IcXuoDElUdExdA5k3lX2rMo0h2fqx63 57mEfhElf6lf78xC6V9XFRy38TeeKLpIaCuS+nT4NZSdKsnSqNR0ZpJ5M76pyPfsLhS2 JYa6abqR1M0Dq0B8YGbgkLdlhsvCZ22qHDjHYxGbQ/6AwzuDlAk3VSXqKcwhGl7FgTv7 dZqA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z5-20020a170906714500b0099277496cebsi971343ejj.348.2023.08.03.20.31.35; Thu, 03 Aug 2023 20:31:58 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233915AbjHDDGN (ORCPT <rfc822;tertiaryakionsight@gmail.com> + 99 others); Thu, 3 Aug 2023 23:06:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233166AbjHDDEy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 3 Aug 2023 23:04:54 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 694314494 for <linux-kernel@vger.kernel.org>; Thu, 3 Aug 2023 20:04:43 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4RH9YN0B9Kz4f3wQt for <linux-kernel@vger.kernel.org>; Fri, 4 Aug 2023 11:04:40 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP1 (Coremail) with SMTP id cCh0CgAXODLGasxkWSvZOg--.12542S6; Fri, 04 Aug 2023 11:04:40 +0800 (CST) From: Kemeng Shi <shikemeng@huaweicloud.com> To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, baolin.wang@linux.alibaba.com, mgorman@techsingularity.net, david@redhat.com Cc: shikemeng@huaweicloud.com Subject: [PATCH v3 4/8] mm/compaction: correct comment of fast_find_migrateblock in isolate_migratepages Date: Fri, 4 Aug 2023 19:04:50 +0800 Message-Id: <20230804110454.2935878-5-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230804110454.2935878-1-shikemeng@huaweicloud.com> References: <20230804110454.2935878-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cCh0CgAXODLGasxkWSvZOg--.12542S6 X-Coremail-Antispam: 1UD129KBjvJXoW7Cr1Duw4furW5Gw4UAr4fKrg_yoW8Gw18pw 1xC3W0gF4UG3W5W3ZxtF1kZ3W5Kw4fXF13Jr9rXw1xArs0q3Z2v3srtF1Fvr90qF9Iyayq vFsrKFySya1UuFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUPY14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_JF0E3s1l82xGYIkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0 rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6x IIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xv wVC2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFc xC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_ Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2 IErcIFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E 14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIx kGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAF wI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r 4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0pRvJPtU UUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, MAY_BE_FORGED,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773267759705543885 X-GMAIL-MSGID: 1773267759705543885 |
Series |
Fixes and cleanups to compaction
|
|
Commit Message
Kemeng Shi
Aug. 4, 2023, 11:04 a.m. UTC
After 90ed667c03fe5 ("Revert "Revert "mm/compaction: fix set skip in
fast_find_migrateblock"""), we remove skip set in fast_find_migrateblock.
Correct comment that fast_find_block is used to avoid isolation_suitable
check for pageblock returned from fast_find_migrateblock because
fast_find_migrateblock will mark found pageblock skipped.
Instead, comment that fast_find_block is used to avoid a redundant check
of fast found pageblock which is already checked skip flag inside
fast_find_migrateblock.
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
mm/compaction.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On 8/4/2023 7:04 PM, Kemeng Shi wrote: > After 90ed667c03fe5 ("Revert "Revert "mm/compaction: fix set skip in > fast_find_migrateblock"""), we remove skip set in fast_find_migrateblock. > Correct comment that fast_find_block is used to avoid isolation_suitable > check for pageblock returned from fast_find_migrateblock because > fast_find_migrateblock will mark found pageblock skipped. > Instead, comment that fast_find_block is used to avoid a redundant check > of fast found pageblock which is already checked skip flag inside > fast_find_migrateblock. > > Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> LGTM. Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> > --- > mm/compaction.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/mm/compaction.c b/mm/compaction.c > index 9a2f0bd5394a..4bf2dc936add 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -1988,9 +1988,9 @@ static isolate_migrate_t isolate_migratepages(struct compact_control *cc) > block_start_pfn = cc->zone->zone_start_pfn; > > /* > - * fast_find_migrateblock marks a pageblock skipped so to avoid > - * the isolation_suitable check below, check whether the fast > - * search was successful. > + * fast_find_migrateblock() has already ensured the pageblock is not > + * set with a skipped flag, so to avoid the isolation_suitable check > + * below again, check whether the fast search was successful. > */ > fast_find_block = low_pfn != cc->migrate_pfn && !cc->fast_search_fail; >
diff --git a/mm/compaction.c b/mm/compaction.c index 9a2f0bd5394a..4bf2dc936add 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1988,9 +1988,9 @@ static isolate_migrate_t isolate_migratepages(struct compact_control *cc) block_start_pfn = cc->zone->zone_start_pfn; /* - * fast_find_migrateblock marks a pageblock skipped so to avoid - * the isolation_suitable check below, check whether the fast - * search was successful. + * fast_find_migrateblock() has already ensured the pageblock is not + * set with a skipped flag, so to avoid the isolation_suitable check + * below again, check whether the fast search was successful. */ fast_find_block = low_pfn != cc->migrate_pfn && !cc->fast_search_fail;