Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp392081rwb; Thu, 22 Sep 2022 20:34:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5zLMYNYY7YYwoqmJC+7ANFM4elynt2zjoujdZgR//YAByRSE+Mq6je2ykyKol2SZEZRZTn X-Received: by 2002:a05:6402:158a:b0:455:3cc7:c1aa with SMTP id c10-20020a056402158a00b004553cc7c1aamr3559857edv.37.1663904070494; Thu, 22 Sep 2022 20:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663904070; cv=none; d=google.com; s=arc-20160816; b=oyjV+Kzo7dLUx+mLld9vpIdNDRsTEADHb8L55CVVoptxrwcHzWBSEHv+stFYvGA2+0 wzzGvl1++zrVzYMh+TzHR7QnMqWZwiWI482QIQvvNzmnlxnNvM6ejeIQHFIBkPwhBIBq FXlxIoNkQWBOlHpNjBDmE1KvBDAT4mjb/sAGoyWU2ukQpzQdWEw+qLvPRQavEfclEdhC Qk6xnYfuvbgN4dNiOY3O253JimgPClHqxbtnpqismV2oBakMThdfU3ADdsjqLF/Qcfzx FTThbJyRhvMsdEiLivDfJPGuZCpnaCW50Hq+sfr80DLKw7i0xrnpTTRqJtgCEQrRxj7t LGJQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=nRDi6gIYJ3AnkdWAZd3CsrgliE0nPpZ0Nty64WxOg80=; b=P2zBsd4BRksEC2N4YGV69MggfEgG51XEYZZFyGeeCEIwaE/d8qVgyX02NMlh0V+a7j isXmCYZdk3PIxBxJnpJ1veF1Py+CQh58Ms8PweNAXf+xQOuv0BC9/aQrTjiU++5Z8Q0p q6ub/IU4PQ7KljxhwLSlnaIktGXRTRMTLJRVFqt9pZ/ZnS5UI51XfVqpAeEZ50kCYh6U 4BG4zbfNZevTzvdZ6R8NLtoH6S0G9M4Wdl9TfwzhHV7fIfPQ3XG58a9bhIKOJRkC60Lz KP+axtFUXBTNrO9AZ2iRY2ewIObGS0G2kwrSlMqQMhlzpn5AM7kMwmBuXxpn5/STA+OO nfUw== 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 x67-20020a50bac9000000b00452ce356136si5958428ede.135.2022.09.22.20.34.04; Thu, 22 Sep 2022 20:34:30 -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 S231975AbiIWDAt (ORCPT + 99 others); Thu, 22 Sep 2022 23:00:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230318AbiIWDAQ (ORCPT ); Thu, 22 Sep 2022 23:00:16 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7642269F63 for ; Thu, 22 Sep 2022 20:00:12 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MYcJJ1WzvzpVZX; Fri, 23 Sep 2022 10:57:20 +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; Fri, 23 Sep 2022 11:00:08 +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; Fri, 23 Sep 2022 11:00:10 +0800 From: Liu Shixin To: Andrew Morton , David Hildenbrand , Waiman Long , Zefan Li , Christoph Lameter CC: , , Liu Shixin , Kefeng Wang Subject: [PATCH v4 3/8] mm/slub.c: use hotplug_memory_notifier() directly Date: Fri, 23 Sep 2022 11:33:42 +0800 Message-ID: <20220923033347.3935160-4-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220923033347.3935160-1-liushixin2@huawei.com> References: <20220923033347.3935160-1-liushixin2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,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 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(). Signed-off-by: Liu Shixin Reviewed-by: David Hildenbrand --- mm/slub.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 234bf0e44262..9a0853e01fd7 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4698,11 +4698,6 @@ static int slab_memory_callback(struct notifier_block *self, return ret; } -static struct notifier_block slab_memory_callback_nb = { - .notifier_call = slab_memory_callback, - .priority = SLAB_CALLBACK_PRI, -}; - /******************************************************************** * Basic setup of slabs *******************************************************************/ @@ -4768,7 +4763,7 @@ void __init kmem_cache_init(void) create_boot_cache(kmem_cache_node, "kmem_cache_node", sizeof(struct kmem_cache_node), SLAB_HWCACHE_ALIGN, 0, 0); - register_hotmemory_notifier(&slab_memory_callback_nb); + hotplug_memory_notifier(slab_memory_callback, SLAB_CALLBACK_PRI); /* Able to allocate the per node structures */ slab_state = PARTIAL; -- 2.25.1