From patchwork Wed Aug 2 09:37:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13337508 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D9E1EB64DD for ; Wed, 2 Aug 2023 01:37:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 687BB2800C8; Tue, 1 Aug 2023 21:37:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 628C2280111; Tue, 1 Aug 2023 21:37:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A236280110; Tue, 1 Aug 2023 21:37:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 3C0E22800C8 for ; Tue, 1 Aug 2023 21:37:35 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id EE59E140616 for ; Wed, 2 Aug 2023 01:37:34 +0000 (UTC) X-FDA: 81077452428.14.2A40940 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by imf14.hostedemail.com (Postfix) with ESMTP id 3F9F8100005 for ; Wed, 2 Aug 2023 01:37:31 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=none; dmarc=none; spf=none (imf14.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.51) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690940252; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zwMKyTqVJ8Zl9NHsNE8W26XxnXlDSfnIBeHIS7EYcBo=; b=0yZDTNcFjuBbNXJGgiipXxIdq/nZ8G8rSpV+yP09AVtoJvVb253xUWSo1kDgPWacolPHCg DnEBkOgwl3zMu6Zau/TJriCnPKXcb2jSDaCM0a24rs+A/o6rfsL3LVdIb4QgI5GrBBA6Qj iGS9r6fM+IhdvmVq2gH4cLqqqTOCI30= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; dmarc=none; spf=none (imf14.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.51) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690940252; a=rsa-sha256; cv=none; b=IyidIWtC2PjCCKWb+ZelnF7FN8kUOGggF6RoOLvTNSEJi/zixIWAl0bwVuJ8bR6tEPZ9H0 mA9sjHKcKGlEqjX/itGIQr1tXttZnHCBtyGApvhLrLpDSjTSeRTbQDLe+ZcwTB73U+DwOy 4ZcOzkgiQH3J++UDi6ZMvmZnbW714JM= Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4RFvjg3XrJz4f3pC1 for ; Wed, 2 Aug 2023 09:37:27 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP4 (Coremail) with SMTP id gCh0CgAXzrFTs8lkvrtvPQ--.56352S6; Wed, 02 Aug 2023 09:37:27 +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 v2 4/8] mm/compaction: correct comment of fast_find_migrateblock in isolate_migratepages Date: Wed, 2 Aug 2023 17:37:37 +0800 Message-Id: <20230802093741.2333325-5-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230802093741.2333325-1-shikemeng@huaweicloud.com> References: <20230802093741.2333325-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: gCh0CgAXzrFTs8lkvrtvPQ--.56352S6 X-Coremail-Antispam: 1UD129KBjvJXoW7Cr1Duw4furW5Gw4UAr4fKrg_yoW8Gryfpr 1xC3Z2gF1UW3W5G3ZxtF1DZ3W5Kw4xWF13JrZrXw1xJrs8X3Z2v3srtF1Fqr90qFy3Aayq vF4DKFyfAa1DZFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUPY14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_JF0E3s1l82xGYIkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0 rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6x IIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xv wVC2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFc xC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_ Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2 IErcIFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E 14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIx kGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI42IY6xIIjxv20xvEc7CjxVAF wI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r 4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0pRvJPtU UUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 3F9F8100005 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: rphbmwmihppsswh4fr5jmc48afzje5c4 X-HE-Tag: 1690940251-795930 X-HE-Meta: U2FsdGVkX1/4fxY4sVG7p+XP9szypnBAH5QTAsvOsA7cTQ6auP8V2+PFOQT4Ei9eG/NVH9cSCioW0O9Jo68XONd0QSf8SjmoTO1z45y3qFSAUCj32QduOQ+qlAxqRoT2oXP7dtj/uaOQ3D4Rp4gRXLsSVgBh4VhL6xItCFAfu3toEpnMh3aLOQyMLFu+XaF+z1M27Q6+nWASZxMLS1IJBtnBv5a0RntpeLfVEvNJUp9ERTjH+hNdZS+SApr0RM0Y6+BF/zrWQitHv2sE/izgqTxvSDZPpFxFzmchyuyHgi7tbcTvPmbK1uGiokspmfkHwQBktUwlPox8HlDP2bu64dPpgBlgzFr3ML9FhVW+Ojr0GvSQoBTBluejT6GgoYN2+emR0ZxeEFhLr9wZXXjksN2f0vLKENF8/N1FKWzoNz8l0hJLxvI8l07BVkY2CVcIAxDoizeVqeVoInqGO/7gAxxju7TQ82G5yry//ETirUQ4VRTuFasYzi2UVkcuIsOpDpBFb5QzcXN3aYD7pVS+OeXtfl0s5T+SWc2n0WHyrxsWVCzEIPc1L41PABY0ChqF5nrwRzzunGVIkzCi/dtJihXBfPUEwg/w9rh5/B05ovNqUaTfiepl4+S/5qBDO2rzDIM/eFhiEJthGa3YZNZzjbTAigiughGULrLXZ5MxifFPIieq/vpImQoZyiIRmucCoI+j5h1Yzc28YUc8vZre32o2KzBr7QiWQbC39p7Jr9VUMZHKGSTxXgCXNeWK9bJdjSVEjlmKMzPkc4jFDMoWkw+aEoHABEzdgV9zpkRQVlEuFBA+1KqfDyZZLZwz6f+tNOKxN6NA8d+uIkmxGCrTaEE23rEDoXWn0Br2ngy+4E86xpYwmG24PgJwgsGCo3X8C76yvIM/g/iX6viMxPz3osjp1C9YGInXdoBZwb+sH/2yHzskPllpcYFHgwMh7RNggGVuK/7Y4gVuMBmDPl6 htsF4ehL +Svz0TFY7xEem5Wbw0fzEuJryxjPtPKDW3qoZD5uJ1aWvxeU6YW+Ay9grZa3OPvYmYAtQkZdFh5PAdBeDpGZhwMh5VQieq38bfYMUDFjBC1LyGqWWnI5nbN2aL7SvNV7gl+zDWONQh2JpDla54MRfJbOCSttQ9op16tDH1OhXyyDl/8sez54JDAk1ZXxwu/Oh3nX7MNG0z+GIQ+2ZSxHdtTrEKPHlR9XQpnEhEgU9i9mC+y5ARC+PET4kKD4nunQLlpr2p8sxwKmyoYl7V3NvdUQg/1g6V8cHEWLfRby8indpgLcEPbphAnpBmwMCwFvYvrba X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 984c17a5c8fd..5c9dc4049e8e 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1966,8 +1966,8 @@ 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 + * fast_find_migrateblock will ignore pageblock skipped, 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;