Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2229590rwb; Mon, 19 Sep 2022 01:35:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Ayci/f4QiiCih/QSEkG6m0cjI9Gaq/6fgoWasae8sKN1AowLqqE4hc5C2ojN+NRuE/8Qr X-Received: by 2002:aa7:cada:0:b0:452:5b04:efd9 with SMTP id l26-20020aa7cada000000b004525b04efd9mr14493543edt.84.1663576547339; Mon, 19 Sep 2022 01:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663576547; cv=none; d=google.com; s=arc-20160816; b=DbDdwg2EXtrquezjhTmBxFiKtKU8XdbSR2XgNvwtm4Fu1xlK2x9EqwbpAgxbqKKfye oLUq4LvB3k7Me6kVDMuOVmy73CC8ivwzm4wqFJmPM+gkZdhTTWsKKro/3XScaDkxZQqs yOvU3DE+8ZKqCzEfJgYrnf2RKtMPqpZSENJhhqPykTqeTUaLM7fHHi/BO82LfdkoswYK 0LRamrglsMd+qhKd9gVarRFzAxbcvOgsZWB8b6NrCYwtJOtETMhfKmQrYuPAZxAeVy9E emhbvGh92dJ81L/xKxQtobNmcN/Kcnd7vCDhODpEzLEnZj7IlZLPG4/vFSZ1srsRE+Cu K2mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=V6EynRCOyQX2B6aMAOmCgwrw0UXgxmAtH8hEqQa32DU=; b=R7PGckFNJOg5K1ejNzpqtSSB00KWMmxZZZ4488OHViIuDmg8NuAI/pZH4tY9mx9IO/ kkMyXZ3M2ywiwahjxEIqKTNnp/4IsSxcCu3G1OuvCJjcseBGaYu3Z37Li6l1wC1UgdMQ dMbzYuZ/+G5I4h7NTNd9aKtw7zpUGwyC/qiAtfLwwktkk3Dcbr6onekJYsz5nt4wFycc apnn+lCJ64Lo8usc2tng+Gke6eflVERwqVJ4uIhUFAWSy5Og/at3qE38Yf7vFv8BjS7k 9EbJotgjH2gU/BMzLOenRbt/iPtabqzk1qzRRhcaeHZjHJqLahvR0WM+q6t7MaMevLll CV0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l22-20020a170906795600b0078173c4efb1si967932ejo.835.2022.09.19.01.35.18; Mon, 19 Sep 2022 01:35:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229956AbiISH6R (ORCPT + 99 others); Mon, 19 Sep 2022 03:58:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbiISH6K (ORCPT ); Mon, 19 Sep 2022 03:58:10 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AF991EED8 for ; Mon, 19 Sep 2022 00:58:09 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MWH4W1kxvz14Qdw; Mon, 19 Sep 2022 15:54:03 +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; Mon, 19 Sep 2022 15:58:07 +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; Mon, 19 Sep 2022 15:58:06 +0800 From: Liu Shixin To: Andrew Morton CC: , Liu Shixin , "Kefeng Wang" Subject: [PATCH 0/9] mm: Use hotplug_memory_notifier() instead of register_hotmemory_notifier() Date: Mon, 19 Sep 2022 16:31:43 +0800 Message-ID: <20220919083152.1824305-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm100009.china.huawei.com (7.185.36.113) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,HEXHASH_WORD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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