From patchwork Sat Jun 10 03:46:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 13274714 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 15C8DC7EE25 for ; Sat, 10 Jun 2023 03:46:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2AD418E0003; Fri, 9 Jun 2023 23:46:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 25DF58E0002; Fri, 9 Jun 2023 23:46:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 14C8A8E0003; Fri, 9 Jun 2023 23:46:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 087018E0002 for ; Fri, 9 Jun 2023 23:46:40 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id B8D3580262 for ; Sat, 10 Jun 2023 03:46:39 +0000 (UTC) X-FDA: 80885451318.29.5EA327C Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf15.hostedemail.com (Postfix) with ESMTP id 7B8D8A000A for ; Sat, 10 Jun 2023 03:46:36 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf15.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 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=1686368798; 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=FzX20v5pR8D/Lshu3JMLlGNfxUIHwwTccEDnSAMNj9w=; b=FK8Ai2nLzqtOKxOXx+LLDAVOVtJdv2p06hieAPn30fp499pywpOx1qOOelL2fcntGELbtA UT/jEll3HYY/s66QzBkY5zAAN+6dT0fidzIlTRDSXeTmLDp5omxNxtSYwzLRAzGn5/BBJw W3IDNiK9l0Nqmflwlgc0DlaBIXHhmI0= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf15.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686368798; a=rsa-sha256; cv=none; b=uE7f8zXS8xeNkmZNEYzy7B/8qAfyStWNko0qfs4VDVtCQHeJODOrhiPTBRzITkr1vlcP9+ JyaSJWHi6/8JuDOQ4V7Axtd6sfB4n88WbwL6omxQSm2J+OFFmU5YmSmmcwnYmj7K0R481T 3eMY1DPdilrvl4X1oTfVORCjmk2wk54= Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QdP1X3jC8zLq5N; Sat, 10 Jun 2023 11:43:28 +0800 (CST) Received: from huawei.com (10.175.104.170) 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.23; Sat, 10 Jun 2023 11:46:31 +0800 From: Miaohe Lin To: CC: , , Subject: [PATCH] mm: compaction: mark kcompactd_run() and kcompactd_stop() __meminit Date: Sat, 10 Jun 2023 11:46:15 +0800 Message-ID: <20230610034615.997813-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Originating-IP: [10.175.104.170] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 7B8D8A000A X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: fixwzitnjad111btoap8nq4bdn3i8bf7 X-HE-Tag: 1686368796-770489 X-HE-Meta: U2FsdGVkX18f40SxU3wjn8a1MLL/DWHTdQLeQWUoyWd/Q5TIF7TusjgW4cOPBUGnMCTQNj6jJ+ce7EeGWJpSeOXYMKNChhO9uPkHbOW93NecsvnhjCiKUcHUHxr6FPAEJ2vTPrnpI4XLGNqpq5vpMMXiJuwfXj1fLjVeOFuiP1U6ST5Gp42Xvsuf36KmHQHggRydxHsVbCXFHOmZ6zE7y8Cbfhn4SbwwSypg+NNMqchxwePM/mA7qq5wtwTKNNiumbVdrnga/WyJQV6GonU7Rcx+MI5VEQWMLJoHHblepC+/2czUyTYPUioo4TOwcjn6D1kPf47bNLBYBoYJyKQFC9Xr7DFdbQU6O00N+NbO1joi7ALWMJ5uRhu2w2uisEkYh71JfLHe7hDX7oMVU93KKu0c8ICN07P00Q+05PkAVWS6X3pcsGiDLmJYXitQQp1HDMwu1KVckKbgoYCHrZXCNv2Vdgb/PlOF7g/eVm0nBHRP4aOXruxXZ6iA7FQmW1rvfLPAiLMFsPjbwxBuoYeA96YzNIcz00vMLdCgXdfvqYXrtr76PgwPeFZD7qT0HD3jbEWaFYKwgeAhTTTc01dFhAn722H8dFyQ4Y74xbfOwig2gvgWKxCQAzruTvpVZsvRAGSUKAzPd81q72DBa9P72Q2xQTT8z4UhPPlYS1VkyvhhEQyR0NJHmsHgDCDq5wnkClrlGHbiwC75hd9bB9zMTcF0LgaX/eflzHDAnU9IgKiHoVJmNaAKbdcom6ZLm0x9WlmUjiTq+jwpJuufnKy8EMgz/klTXc19hotMf6f2vS3pOft7Awl24J6BmqHPkLck0ydKcVVSrds7qK/oIkt7oVaRTuOlYGEGujNR/fjjJ1kBskZXoy9ZbWl4CulSLCpndhKFbNBh8Q6KznL5hpGy27dEUIemZffLMJ7V5XkmISPKxR5ecwVPahjcaWkTyhTTrSr+XXL8de/n/qIKzmc FwfZ9VTN pkf7NkMsBR4E+lmvgMFIr1vC7apsTz/JZYBj3cLWhwfYar01Nfx03vdTTWFfaf/brV6IqxzuDxPbOAV1N9G1Pra4n2uPcGQeZm8LjsmbOaMWzgp4JC1iCrr9J3+MyVTXZyebB5VgeCIp9JjObfxzPigjYUUVr5AIxMU0BUAb5bvfufukM6aHvrhLTlyMDXD8PKz+Y 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: Add __meminit to kcompactd_run() and kcompactd_stop() to ensure they're default to __init when memory hotplug is not enabled. Signed-off-by: Miaohe Lin Reviewed-by: Baolin Wang --- include/linux/compaction.h | 4 ++-- mm/compaction.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 57b16e69c19a..e94776496049 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h @@ -98,8 +98,8 @@ extern void compaction_defer_reset(struct zone *zone, int order, bool compaction_zonelist_suitable(struct alloc_context *ac, int order, int alloc_flags); -extern void kcompactd_run(int nid); -extern void kcompactd_stop(int nid); +extern void __meminit kcompactd_run(int nid); +extern void __meminit kcompactd_stop(int nid); extern void wakeup_kcompactd(pg_data_t *pgdat, int order, int highest_zoneidx); #else diff --git a/mm/compaction.c b/mm/compaction.c index 3398ef3a55fe..8859cc91062f 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -3086,7 +3086,7 @@ static int kcompactd(void *p) * This kcompactd start function will be called by init and node-hot-add. * On node-hot-add, kcompactd will moved to proper cpus if cpus are hot-added. */ -void kcompactd_run(int nid) +void __meminit kcompactd_run(int nid) { pg_data_t *pgdat = NODE_DATA(nid); @@ -3104,7 +3104,7 @@ void kcompactd_run(int nid) * Called by memory hotplug when all memory in a node is offlined. Caller must * be holding mem_hotplug_begin/done(). */ -void kcompactd_stop(int nid) +void __meminit kcompactd_stop(int nid) { struct task_struct *kcompactd = NODE_DATA(nid)->kcompactd;