From mboxrd@z Thu Jan 1 00:00:00 1970 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 5BABEC6FA91 for ; Tue, 20 Sep 2022 02:17:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1FEB480009; Mon, 19 Sep 2022 22:17:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1864794000A; Mon, 19 Sep 2022 22:17:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EF3E180008; Mon, 19 Sep 2022 22:17:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C3DAD94000A for ; Mon, 19 Sep 2022 22:17:54 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 9351840E39 for ; Tue, 20 Sep 2022 02:17:54 +0000 (UTC) X-FDA: 79930853268.18.95CFC40 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf27.hostedemail.com (Postfix) with ESMTP id F172C40003 for ; Tue, 20 Sep 2022 02:17:52 +0000 (UTC) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MWlTM428Wz14Qcd; Tue, 20 Sep 2022 10:13:43 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500023.china.huawei.com (7.185.36.83) 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:48 +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:48 +0800 From: Liu Shixin To: Andrew Morton , Zefan Li , Waiman Long , "Christoph Lameter" CC: , Liu Shixin , Kefeng Wang Subject: [PATCH v2 0/9] mm: Use hotplug_memory_notifier() instead of register_hotmemory_notifier() Date: Tue, 20 Sep 2022 10:51:14 +0800 Message-ID: <20220920025123.2868953-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663640273; 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=QeBI7NHUcF7CC3tKi1yICu1mt4E4H1ZDrYec8SI5meY=; b=sxHdgHdhDR7PgSn/Ws1A6GQ8zLkK7GvIkavLxbpBR9IgZ8OLBxOzcRyDm3Txe7isrR5eDv X9MN0tlZqFuOLnFmcp2YFZCQzTl382c+daJp04qaJw/pJc0lyX5Bm89KpXZ8m39KhwL3iP Fj0wlHhiGrtPv7DPxxjt0QK1Lu3zU5Q= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf27.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=liushixin2@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663640273; a=rsa-sha256; cv=none; b=lZ3C9IExN8CB8KW7sz1YZD8RZ5KwC3aHDrWWdLxLHtKBqx1lggZCCCSbTS+EuYEje1YrwZ b9NF2V4gT9cK5dLzQ7L6XTNIVhRZKA9XCc22AfN+Z/crTPayfCXceOzpC/B8XSUTGqVzyX 8BBk+1IT3bDxD62b/AaUod7L8bmcqqs= X-Stat-Signature: gh6eap8w6hyg8bu9dje6tg5o445ssh41 X-Rspamd-Queue-Id: F172C40003 Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf27.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=liushixin2@huawei.com X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1663640272-39160 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: Patch f02c69680088 introduced register_hotmemory_notifier() to avoid a compile problem with gcc-4.4.4: When CONFIG_MEMORY_HOTPLUG=n, we don't want the memory-hotplug notifier handlers to be included in the .o files, for space reasons. The existing hotplug_memory_notifier() tries to handle this but testing with gcc-4.4.4 shows that it doesn't work - the hotplug functions are still present in the .o files. Since patch 316346243be6 has already updated the minimum gcc version to 5.1. The previous problem mentioned in patch f02c69680088 is not existed. So we can now revert to use hotplug_memory_notifier() directly rather than register_hotmemory_notifier(). Patch [1-6] replace register_hotmemory_notifier() with hotplug_memory_notifier() for every caller. Patch [7] remove unused register_hotmemory_notifier(). Patch [8] replace IPC_CALLBACK_PRI with MM_BATCH_CALLBACK_PRI. Patch [9] collect all priority of hotplug memory callback into include/linux/memory.h for easy reading. v1->v2: fix compile error of patch [4,5]. Liu Shixin (9): cgroup/cpuset: use hotplug_memory_notifier() directly fs/proc/kcore.c: use hotplug_memory_notifier() directly mm/slub.c: use hotplug_memory_notifier() directly mm/mmap: use hotplug_memory_notifier() directly mm/mm_init.c: use hotplug_memory_notifier() directly ACPI: HMAT: use hotplug_memory_notifier() directly memory: remove unused register_hotmemory_notifier() memory: replace IPC_CALLBACK_PRI with MM_BATCH_CALLBACK_PRI memory: clean up hotplug memory callback priority drivers/acpi/numa/hmat.c | 7 +------ fs/proc/kcore.c | 7 +------ include/linux/memory-tiers.h | 1 - include/linux/memory.h | 15 +++++++-------- kernel/cgroup/cpuset.c | 7 +------ mm/kasan/shadow.c | 2 +- mm/ksm.c | 2 +- mm/mm_init.c | 8 +------- mm/mmap.c | 6 +----- mm/page_ext.c | 2 +- mm/slub.c | 7 +------ 11 files changed, 16 insertions(+), 48 deletions(-) -- 2.25.1