Message ID | 20230805110711.2975149-10-shikemeng@huaweicloud.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 91C6EC04A94 for <linux-mm@archiver.kernel.org>; Sat, 5 Aug 2023 03:07:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BB7DF8D0007; Fri, 4 Aug 2023 23:07:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B40DD8D0006; Fri, 4 Aug 2023 23:07:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9BF7C8D0008; Fri, 4 Aug 2023 23:07:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 8AFB38D0007 for <linux-mm@kvack.org>; Fri, 4 Aug 2023 23:07:08 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 59C1A1A02C0 for <linux-mm@kvack.org>; Sat, 5 Aug 2023 03:07:08 +0000 (UTC) X-FDA: 81088564536.14.8FD4C0F Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by imf28.hostedemail.com (Postfix) with ESMTP id 3AB69C0006 for <linux-mm@kvack.org>; Sat, 5 Aug 2023 03:07:05 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=none; spf=none (imf28.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691204826; a=rsa-sha256; cv=none; b=7AKxN55MPY65/w4nNfMTk3tKmvs9jp8QqxiFkNJHXZfmrbg1JyHBYcRCLZZDTuNohN3wEB ZWtofFoTvHL5gjLoOHOdToIKy5+IAiZ3Vd0YtkDvpyqDIPKUdMYW161LeZ9l+DxJExyckj AqIr7Hky1fOBD/8wczDSs5zsue7OhN4= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; spf=none (imf28.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=1691204826; 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=KLsFy+v4yVmbzWqz2R32IBuN6RqkZlHIng/lQs9O/Vk=; b=zZjYK+6FSpvUNWcTtI6T15CiabtK0DfS3u7bhgsCPFZxKnbNvoCK1DUVRLWhLxHsCfKl2/ kbrc3wpLYOz3E4VabPExsW6MtOiMlwzd0cSuN6bYHxbrrUw5UipeU9RlGOXH5iu3SimId2 g68Lnn+VfNGOn4HNg2HG3BWmxDRkVuk= Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4RHnYc3DzWz4f3nTY for <linux-mm@kvack.org>; Sat, 5 Aug 2023 11:07:00 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP4 (Coremail) with SMTP id gCh0CgAHvrHQvM1k6A5ePg--.23962S11; Sat, 05 Aug 2023 11:07:01 +0800 (CST) From: Kemeng Shi <shikemeng@huaweicloud.com> 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 9/9] mm/compaction: call compaction_suit_allocation_order in kcompactd_do_work Date: Sat, 5 Aug 2023 19:07:11 +0800 Message-Id: <20230805110711.2975149-10-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230805110711.2975149-1-shikemeng@huaweicloud.com> References: <20230805110711.2975149-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgAHvrHQvM1k6A5ePg--.23962S11 X-Coremail-Antispam: 1UD129KBjvdXoWrtFWrKr47ur4UAw17tFW8Zwb_yoWfXrc_Jr 1xAF4YvrWayrykWr4qkr4SyrW8Gw48Ar1DJwn0qF42yF9Fy39avw4DZFy7Zr15WFyDCr9x ua1rXa4DK3W29jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbDAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M28IrcIa0xkI8V A2jI8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJ M28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2I x0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK 6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4 xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8 JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20V AGYxC7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAF wI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc4 0Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1I6r4UMIIF0xvE2Ix0cI8IcVCY1x0267AK xVWxJVW8Jr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r 4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0pRvJPtU UUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 3AB69C0006 X-Stat-Signature: zdgao6q6g3otzgjfdxhrgkptofqmpi9o X-HE-Tag: 1691204825-387171 X-HE-Meta: U2FsdGVkX1+2p1TaMp1RaseFjbSRT09MkpGsM2Yzaztzyddd4jNksAeDfxFeawoD68A1qlKRNtzuufrjwQpwFOyAVucVWn8tCua2pibKbIKwRohkhDxMK31PbAIVjbE0ktfOI1TCXxAK6sSRvsaMCbbgYXJjQajvou/VzczOu5ORehxHNyNXC1YMArXJ59Jjw5StnGtoK2nLKPK/EtH+UgGrZ7GQo5vrrpePh1TCmexucZQzZtfOD5q7GkkCDKDFMVpytym5BpT7AkfIIBhlzp9tnviDz6i8Kejm1VY1c3ErMaxpBR3sfATi6W/Mo8x/H09E9iqJNvA+2Mse3c4B53Zt2pE6ur8ukpLuqPV2s53RpxdKR/a+vaKE27lBUKX+8/IVejkS+CeKiYWGbDk0gx/OKptAVj58sNuArtGZCPP2dlpEqjhtSFLb7tfTSMDndFXtHzPBiPF7zGLw9vu63V7HOPppFDcc7/jeBIkJN/GaAH9jIGJ6Mhb8yaikBOgaX49zLzBWtwm1x35PVd5XHdNwbQzbJG3ZuGCiLap7EX2H8BshmijFtaOXeEo7+0vUBga6Oscr3H+KzFOUkZ7lJ5goLgeM9NN7k5bjXosf1WdbsUKrStTdf4NuHtK77lNGY/U0DVkuNSMzHVwJWnl6TrSxFZKRpVEaEo4nhPfHpcLJGWIM+612EqQptySAhI1UEZFMh7yoRacKRU6c3tcSf8t4RkNHfD5g058994yHnCWyIxugCYVSJyggrYeH9u5iwXJE9YCpYklQoDyD1IrBpBtihYycDgZHKCi27zksx8O7pBmBdMfOqY2SucHLCvgtuqzQOX9701nnLKQxMCxAGf6w+fEMR4SIqBxIF8Sc3zBbVoUVbIl3GgSucR85iGNLJ1EZP3xIiCwuQYpZGfxwir7+YQsvjayktgDLYGian0CrgMpbbQAUKSYYOWxqLtmJ0K8wbDLk6kT65eDQJBU EqprtC+d AJ+TYXw8gox2G1s/Ahm0Mb6SUybAV2eFnXX3E6P6BCvEloKXJGhIYf7Z0SA999wEICk89qeJ7GM98eiKBXRwQJhKfe2yG39d3/AzRRvdqciqlZEXzbBDwxqxAahw7/h3D5vabfRU5WTJqSNRhDNIsUnOIpJi7ZxltVZNudX6e6gOMIhfPFYlXwzCwBnlfUhJRRo2TFelWiDO87aMLIRP63RGCSaoAGs+33ZZAlt9siFua/Q475f+9VTu0ZXGbrXWKTf+2T/tzii//TJY= 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: <linux-mm.kvack.org> |
Series |
Fixes and cleanups to compaction
|
expand
|
diff --git a/mm/compaction.c b/mm/compaction.c index f4b6c520038a..05c27a1ef68a 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -2963,12 +2963,8 @@ static void kcompactd_do_work(pg_data_t *pgdat) if (compaction_deferred(zone, cc.order)) continue; - /* Allocation can already succeed, nothing to do */ - if (zone_watermark_ok(zone, cc.order, - min_wmark_pages(zone), zoneid, 0)) - continue; - - if (!compaction_suitable(zone, cc.order, zoneid)) + if (compaction_suit_allocation_order(zone, + cc.order, zoneid, 0) != COMPACT_CONTINUE) continue; if (kthread_should_stop())
Use compaction_suit_allocation_order helper in kcompactd_do_work to remove repeat code. Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> --- mm/compaction.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)