From patchwork Fri Aug 4 11:04:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13341175 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 5B2B7EB64DD for ; Fri, 4 Aug 2023 03:04:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7CB712802BE; Thu, 3 Aug 2023 23:04:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 756B72802AE; Thu, 3 Aug 2023 23:04:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 55A572802BC; Thu, 3 Aug 2023 23:04:49 -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 381142802AE for ; Thu, 3 Aug 2023 23:04:49 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 03DA11CA360 for ; Fri, 4 Aug 2023 03:04:48 +0000 (UTC) X-FDA: 81084929898.12.7359D3B Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by imf02.hostedemail.com (Postfix) with ESMTP id 5684D80002 for ; Fri, 4 Aug 2023 03:04:45 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=none; spf=none (imf02.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.51) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691118287; 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=rskdlnzcT8oAIsMut4xbyGOKCRXz3TQRkhifY3ziyhY=; b=L4QR46gMZHeQRKLvz0i7gy94ZOc1qn+2Y6R45CX+7KvrJ78YjlQ5ch0Ci8A1oZMNVQrxxX amOH2Rc9dm3XE4Zyb65yyuqVGQZjd4dL2XV7CGL2iILLo8EaiZwcj4egWRTNF3qnvvOueg ZE5B1Qtt2Z4cHjc0oEcINPqZhB4eYIc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691118287; a=rsa-sha256; cv=none; b=1wRtarfFx5Cl0Aj/tIuOCT254CLzHiE7fUCN8MB2j46WuE/EdfcDy7+S1QXzhVLHKUmeLE Xa3BP1olmtDBNcy3EwrxQFtHR6l4lAqu9HvKlS+ZScOlW2E86jzpKeroT3jbcmg0uk1Teb xRZRIj+THJmZa0Qm+qLOa6QXQ7TVKo8= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; spf=none (imf02.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.51) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4RH9YM6yhSz4f3wQl for ; Fri, 4 Aug 2023 11:04:39 +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 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-Rspamd-Queue-Id: 5684D80002 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: f3w3966dypsgeu8j1t55zqfrsszuu6wh X-HE-Tag: 1691118285-875010 X-HE-Meta: U2FsdGVkX1+oVKBrs5upPObOkSnvlTN/nms4kZRsqVFyb72MlxnC6rygTIzzuBGpNJghi0pTnywyM8F731rX254k+xOoHrA7GfICJlzHSR+k9yKWmqaSzhVMRRvOP4QwIMb7r+sa6ELPj0PcTILq1pShorn5mLPkrxbUiQ2hw1hXVlXjGPXkrL+NYaYT/BbGLO4qZFNsIyOqdjkMPeKsJKBEYGOdtrH0U9thUaxSNTuDAUE12g7rnimrIjSIm2dCyE6XiNovVwcKAhThkTm1wOMT6AXh7QFcHVgS1CdHyFVOos5tFdxuLRzRM96Pm8GF0NDZ/lqSNYU7ZE1x1RkZhPc7sc+zyXFHkcJSB8bXm6HLK64VpKGo71wjfggyCv+hogVO9Zr4FTrNGqCFwhywr9F3e79Y+b/xCYBkB635NxmM9xH9CX23nTCnchddi93Pd+hhSA1iIaUh8/7zw5REFGrCcwW4VC0AasN0M2HMw7BxO47cFUKvN/Z84Vqbz/rbr8enNPiWYHn9q3pw2ypV94LgftVhh8ErSX8eQiKxMNeuWrR6+MOFHlQpqdkKMYm09IKa19UdQ/3CPbi6XR1o4r7JIMl/x2TitBiUlEvmK5eZIApeREr6840+82b6Fme+9y+98wvBx6tbCRxW2iqu+3Wwh0EUpGKhyUy2z32l8G20HzELEuc8Ose3ysdfsFcC4HgNwepUVQgxN8vnVDoQry+kMtLweSb+v39Si7BUejuJJmcUhfYHEIbPhrYHbBAc1veVQhg2fx9ny8JM4tDrIg7lXvgV0dQm0P6BEBgiaCLMWdoeBi36Z7/vN3RmY23hCd/lfJz8bXaEtNKq8UpQLSybiALWgmpIUnBNekRpncd7WNrtSiqxmkWLUFM8/ty8YQnAeP+inluOVYeHsmhjfJpnTZmpkjnrSv8yfAgEpwTEbzZJ7dZDLmuNaolic3kvj77lcjYyMFuBYoHJfSf 2phpffeF /fPgIBG5+BRy9YhaMD+8vy65vdhDx7Ea+csn9jAg2OdzeIbRO5WtXqVEQDuWmPzPDB5df/znYukBUqW1KtIP+/5kXLFTD6hCUHCZBjSyL9keXKfRm8wDIGbMvVu9J8PQGQEurnyu7Df3fAL1daduc5BG5wniIHlJ6vhaMoTW0hH65HljtJCKca1OgiB0pLeaj8pMXjePkfUklmmEqjPvBlF1WdfK/6+vDYl5QBF498xhxr6yxRehXFHa1e22xT3O4SqJdm2ti8c4SX+yITDiFDji/hnpdckxnJSouxxbff/cvEXzHfkvwn/ss/ZBdWeP7ezq9 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 Reviewed-by: Baolin Wang --- 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;