From patchwork Tue Mar 22 11:07:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12788258 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 E2C3DC433EF for ; Tue, 22 Mar 2022 11:07:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7876F6B0073; Tue, 22 Mar 2022 07:07:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 710A56B0074; Tue, 22 Mar 2022 07:07:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D7416B0075; Tue, 22 Mar 2022 07:07:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 4FA936B0073 for ; Tue, 22 Mar 2022 07:07:19 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 09D6F203EF for ; Tue, 22 Mar 2022 11:07:19 +0000 (UTC) X-FDA: 79271745798.03.A9D76D1 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf30.hostedemail.com (Postfix) with ESMTP id 38C1880022 for ; Tue, 22 Mar 2022 11:07:18 +0000 (UTC) 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 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 Authentication-Results: imf30.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf30.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 38C1880022 X-Stat-Signature: yoceim9n4sunaf4m1i54h57ywu9q5wwr X-HE-Tag: 1647947238-482371 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: Use helper isolation_suitable to check whether page is suitable to isolate to simplify the code. Minor readability improvement. Signed-off-by: Miaohe Lin Reviewed-by: Wei Yang --- 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;