From patchwork Tue Sep 20 02:51:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Shixin X-Patchwork-Id: 12981233 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 9C88EC6FA91 for ; Tue, 20 Sep 2022 02:18:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F1D108000B; Mon, 19 Sep 2022 22:17:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ECD0C8000E; Mon, 19 Sep 2022 22:17:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CF9068000B; Mon, 19 Sep 2022 22:17:56 -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 B04F18000E for ; Mon, 19 Sep 2022 22:17:56 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 8C110A05EF for ; Tue, 20 Sep 2022 02:17:56 +0000 (UTC) X-FDA: 79930853352.29.3379B5C Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf15.hostedemail.com (Postfix) with ESMTP id C7846A0006 for ; Tue, 20 Sep 2022 02:17:55 +0000 (UTC) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MWlWh1zZmzHnyr; Tue, 20 Sep 2022 10:15:44 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 10:17:52 +0800 Received: from huawei.com (10.175.113.32) by dggpemm100009.china.huawei.com (7.185.36.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 10:17:51 +0800 From: Liu Shixin To: Andrew Morton , Zefan Li , Waiman Long , "Christoph Lameter" CC: , Liu Shixin , Kefeng Wang Subject: [PATCH v2 8/9] memory: replace IPC_CALLBACK_PRI with MM_BATCH_CALLBACK_PRI Date: Tue, 20 Sep 2022 10:51:22 +0800 Message-ID: <20220920025123.2868953-9-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920025123.2868953-1-liushixin2@huawei.com> References: <20220920025123.2868953-1-liushixin2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm100009.china.huawei.com (7.185.36.113) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663640276; a=rsa-sha256; cv=none; b=hrusUPL+1KSZ9jRkDrd+TPk3y4QFtjCUZd1sOuJfTo7dQk8fsvYlGM7ptXC2DfYBBVBcIl 1phshv/jEGTmsBls5t9Hbr2Od4mhNv9gqnmbtdWAecIjWp+GvM5RAJbcF/FaObOAgkdsmI SHnbxRGn3VQqZvWIn7+tH7i3Y+bUw3Q= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=liushixin2@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663640276; 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:in-reply-to:references:references; bh=NAfaEIVxysTwPYEf4UpDxT6YN7GCRIxUhQmCEwNp05I=; b=fSqRYrjf/+UNffBV/MdzXcJ2/jLVTjjVWZgdShpMyGPXezVXpkQ+h6YbNNCKZHFxKit2gG +rxIanNTD6kGOErqGWYoVLL8i+jPU22UaIW9EZzGhAgRSu+Cy2cbDl8/F+apAkdH1luslq p0LVxKGEQkQOCjk4RV2odzPSJcSukdk= X-Rspamd-Server: rspam06 X-Rspam-User: X-Stat-Signature: 4oiyaadewyop3pzcz7iy8gffcc4mxbqe X-Rspamd-Queue-Id: C7846A0006 Authentication-Results: imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=liushixin2@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-HE-Tag: 1663640275-605270 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: Since there is nothing to do with ipc, it is strange to use IPC_CALLBACK_PRI here. Replace IPC_CALLBACK_PRI with MM_BATCH_CALLBACK_PRI for easy reading. Signed-off-by: Liu Shixin --- include/linux/memory.h | 4 ++-- mm/mm_init.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/memory.h b/include/linux/memory.h index 98d2a2ebcc10..e5f71d3d9af8 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h @@ -112,8 +112,8 @@ struct mem_section; * Priorities for the hotplug memory callback routines (stored in decreasing * order in the callback chain) */ -#define SLAB_CALLBACK_PRI 1 -#define IPC_CALLBACK_PRI 10 +#define SLAB_CALLBACK_PRI 1 +#define MM_BATCH_CALLBACK_PRI 10 #ifndef CONFIG_MEMORY_HOTPLUG static inline void memory_dev_init(void) diff --git a/mm/mm_init.c b/mm/mm_init.c index 44aadc162d1f..1dd9257e2204 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -181,7 +181,7 @@ static int __meminit mm_compute_batch_notifier(struct notifier_block *self, static int __init mm_compute_batch_init(void) { mm_compute_batch(sysctl_overcommit_memory); - hotplug_memory_notifier(mm_compute_batch_notifier, IPC_CALLBACK_PRI); + hotplug_memory_notifier(mm_compute_batch_notifier, MM_BATCH_CALLBACK_PRI); return 0; }