Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3042103rwo; Thu, 3 Aug 2023 20:58:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG9g1wL9jM7LPdafk41OuGhP/aw57SeRcW2LF38BhZbdAJ4T5fEFh4K14KShFhqwiJhGEun X-Received: by 2002:a05:6a00:124b:b0:64a:2dd6:4f18 with SMTP id u11-20020a056a00124b00b0064a2dd64f18mr647718pfi.13.1691121516318; Thu, 03 Aug 2023 20:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691121516; cv=none; d=google.com; s=arc-20160816; b=VFFOyQObt8cxC9D8nrEH6H+jY8d3NjMYVgPerzZ+ecdqcZ65IXCUvcp2FE3HcCAbA2 wzFwQi0ip17zG5AM82oJBT89F3WWCTT/6ItjeHGUbB5KxACZ7MrSTRhxm5wXC2RrsHm9 gALUvdtKtvOlpr6kjOnMn6psAXAIBHMGr/jUG3vAaPe2FUgHF8NqfH0+afLFKC2nHbFK o5ci3vUu/mogws2P+lVlB6+22csUeDMGAVPiHViGt7uIYeG3ojI7KQGv2DlegDb3zOqA jqupys4zpdfJGL0INZLVDQ/R2rkaDlA9jJTeC47u8RBrG9MOQeaGxhIcBxhLyVyi52AP sHeg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c15-20020a63d14f000000b0055b6a717367si1051650pgj.45.2023.08.03.20.58.23; Thu, 03 Aug 2023 20:58:36 -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 S234009AbjHDDGG (ORCPT + 99 others); Thu, 3 Aug 2023 23:06:06 -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 ); 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 ; 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 ; 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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; -- 2.30.0