From patchwork Tue Aug 8 02:05:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 13345577 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 EE9F9EB64DD for ; Tue, 8 Aug 2023 02:06:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3BCE86B0071; Mon, 7 Aug 2023 22:06:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 36D616B0074; Mon, 7 Aug 2023 22:06:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 25C3D8D0001; Mon, 7 Aug 2023 22:06:23 -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 173CA6B0071 for ; Mon, 7 Aug 2023 22:06:23 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id CBA24A0B8D for ; Tue, 8 Aug 2023 02:06:22 +0000 (UTC) X-FDA: 81099297804.07.B94F5E3 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf08.hostedemail.com (Postfix) with ESMTP id 80DAD16001F for ; Tue, 8 Aug 2023 02:06:20 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691460381; 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-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=lUs9q3jB+q2zJwM3N1mx9HziyZsU41Y9YEDTJpEbRqc=; b=f5czEU2CLYGRwc9IT+wFuAVdouYX0GxDIXzdlM4Qkgxs9Ry5ikSwL2rjwsyopNEPNO06o2 lYcybHVAdi9tWPo5bQJxYosln8eJSmqo6mdjtdiYrnbc03sZzt9ENMbBDrnECeRo4JBmRJ gYgaPDPabayrB9ix2Sx499BU6FP1fLs= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691460381; a=rsa-sha256; cv=none; b=Gh0qwpTjPF32/W5Hu1o/XNKWCB1fwjNzp+r7vIavdvg07VLZzSMRc7C/NYl4jREhhGXG/D e1GriUDR2BxeLfz08cVxF7k1+aiVDXIgBE6VQdGrAtLINNNu45uwOAgzfMCU4UEJ25/BM9 FLWnNM30O+Psa2tIbpuE3jSidA0utHY= Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4RKc2q2fmKz1KCFW; Tue, 8 Aug 2023 10:05:07 +0800 (CST) Received: from huawei.com (10.174.151.185) 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.2507.27; Tue, 8 Aug 2023 10:06:16 +0800 From: Miaohe Lin To: CC: , , Subject: [PATCH] mm/page_alloc: remove unneeded current_order check Date: Tue, 8 Aug 2023 10:05:55 +0800 Message-ID: <20230808020555.658430-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Originating-IP: [10.174.151.185] 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-Rspamd-Queue-Id: 80DAD16001F X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: q5uex41i7wioyt8rowmw48xyjqe1ygam X-HE-Tag: 1691460380-731887 X-HE-Meta: U2FsdGVkX19oTbyGJkb5v145m8Tzh1zYMJ8+cG5GQOHsp3ZEGrB4AT4JnoabGT+0zQJgfX7lXyYgfaOvz/AUyrmOOJ7ZuVkzW5SrLTOTGV0QnUgxoezZFP3jQ54i/xuG0YG8GD3/aWpVy1erTxDAapVlassldqIHXtXg6uPqlT/zXywyxrbHkHZCdBQwAOcPT+y6udoXJx+jv1I9Fj7juy3cZYzUHbnajJ9epJPZEHP+Ots4ZXiUe6sFPURYDh5FcyK7NvGnvKIBfQvtULkEChk0HEwllp7VOyso+Dbq6Dt9fGyDwmyXKnxIWc/nX1lpLInGLLzZHfsGG1Zn5ACEZL9/3YodY4afNQLV+ttgqhEioyPQCk3a99HamnlpAeQyh8px7xIVQc3pVDySPU1qEwyiTJnHppS3uQEBAKz8aX3Ey0VVGW4q6gWjaEfFfNf0F+VKAlEdoZdUfTDS05CuV+cNtiE7C0r2s6RJibE75OqN9OXj8X1iItWj8ybbLCyM28w6dI72Y2qa3zJIgp8EV+DKwIi1LMxuS+mnu4A1bPz8xCVeyK02ydAMy3v/phj96iKoGPvX4zFmEkiv57HB+Xt8C4aqF8WFt2pDrfiFFf5xkds2GPAi7rMPIGyfFGDHFcTLv/unv/RTmNG6oz7VChaFK1/GyAp+sxV/iW4JeunGjjnvzhMA38ZUjW3/evQ7UsVFg48w1aBPJqcFBu2l4T6/rheNx0MU0kf+WDrHb8/8W4344KNTpQ04FasbqWOHlGQ6PIRUvz9ja08haoX0QWR+1bnxSxHjBVQRYp9Rl7VFMW+JwtgUI7DnwmBBvKdcIfv+roUOBjgMZIdYkeeIB7rK1upGmR+zW6N0qgXRL0BDFzisWs4YUnOOsRMRX22X/Ofr27W7kDbJaP/JHcR1j5csK5kztTFxTuBR+McIqhi/bLbN9Y8DS/vOnMjcQWQh0AjG/UfN1tRF7h6sXQy 1fTKDyWr U1UTFatMgPVO4aVi8RWH8gX1st3ueUncROBN2Kln0fqZq1ryIYbaf3Rqt1zGb5DmIT8sBvTnYsCcw8KXFX8Ti5XMrkKI0OC7EdY4MMfAwFWiwQILPolbWAyMIA+FQwDP6c0EDpFzq21HgDO8KMSfOF6BjgcnpI2CDIFfpCckayEnZFqllC9/0r7XDQIuFRFH66OHw 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: current_order is guaranteed to '>=' min_order while min_order always '>=' order. So current_order must be '>=' order. Signed-off-by: Miaohe Lin --- mm/page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 96b7c1a7d1f2..d37ec87515d0 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2072,8 +2072,7 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype, * allocation falls back into a different pageblock than this * one, it won't cause permanent fragmentation. */ - if (!can_steal && start_migratetype == MIGRATE_MOVABLE - && current_order > order) + if (!can_steal && start_migratetype == MIGRATE_MOVABLE) goto find_smallest; goto do_steal;