Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2770364pxp; Tue, 22 Mar 2022 05:59:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmrEvw5D6sxD6emotbPu8AgqLjVyFvr6xvHCM4DUnyMulKb1Rvi6ZuiRFtl8LOCDWnlbWB X-Received: by 2002:a63:d442:0:b0:382:6f4e:d49f with SMTP id i2-20020a63d442000000b003826f4ed49fmr9561553pgj.7.1647953959530; Tue, 22 Mar 2022 05:59:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647953959; cv=none; d=google.com; s=arc-20160816; b=EfrquktstruLLuyYS2ho/AiSOMl3uyogA4WcmxwHuihFaIybNKF4hFgLvJ68PGHqiY gJ9NwogywtBkHnbJHhspRjm+4qScUwWTG14dJdyU2tCx/7BtIRNzRvFTogKb86Z/YzUQ rNCVRl7Fk5PWAj95MHhHNk7JqdykIQg8ir9F86tvu2inQvM8LzEQ2ngdYBrpRnDoGMP2 SfKsLTjrG9smvkcWlvfbVGKnvONAFKh6pGO372ErbvBvPgkZ2/98oWUldgqFD2aiNZKT 7LrsHRl+65BFluP7eG6piQQ378xux+J3e1sDRLXxOQAnRa8e1H/ABP44dbVZAEURjHqU 147g== 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 :message-id:date:subject:cc:to:from; bh=UGKkJkHUpXBv+G95R7TYQq/jBUNKD8wGyJRS0Z6OYKg=; b=ZBsfNKVQ5pbm1vNe9rw6a8fQfLL/XT/4gEUI9tVEyGhxMjtYGom9ycMClxgKcXCMGa CnFTD5at9slZSZF7pyVvo/jBbQHBLTtogv5Mpz0ubJzBsz/Q1C5gYykmudLpuSAs2REm 4JneH52aPdFloiGu203MqWNxtnGut2ouzw/Dg9DLakoSB9sC/VkefXC7NycNPMxgodIQ XMWAECRbyTcxAG5wj0ccG/ihU7k65rytEXrIw+/jQNSDLJGdsp+Ek6l4VqbKV12HMvjb /pAR+Lrs/yMJmESyFPCOeZVXlkj/ueVrR71nGsiEqimSkdSO/DuM29r1DSYhWku1jk9l sIbw== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t4-20020a655544000000b003825c4f820asi9101747pgr.233.2022.03.22.05.59.05; Tue, 22 Mar 2022 05:59:19 -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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233919AbiCVLIs (ORCPT + 99 others); Tue, 22 Mar 2022 07:08:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233880AbiCVLIo (ORCPT ); Tue, 22 Mar 2022 07:08:44 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9DE080212 for ; Tue, 22 Mar 2022 04:07:16 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KN7rR3PkNz4wBF; Tue, 22 Mar 2022 19:03:19 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 22 Mar 2022 19:07:14 +0800 From: Miaohe Lin To: CC: , , Subject: [PATCH] mm: compaction: use helper isolation_suitable Date: Tue, 22 Mar 2022 19:07:50 +0800 Message-ID: <20220322110750.60311-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, 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 Use helper isolation_suitable to check whether page is suitable to isolate to simplify the code. Minor readability improvement. Signed-off-by: Miaohe Lin --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c index c3e37aa9ff9e..86f34053c39d 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -899,7 +899,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, * not falsely conclude that the block should be skipped. */ if (!valid_page && IS_ALIGNED(low_pfn, pageblock_nr_pages)) { - if (!cc->ignore_skip_hint && get_pageblock_skip(page)) { + if (!isolation_suitable(cc, page)) { low_pfn = end_pfn; page = NULL; goto isolate_abort; -- 2.23.0