Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp830742rwb; Thu, 22 Sep 2022 07:01:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6fhPX0VleI+Ac9noG7ODzgp+U+l7crbZaHMSMHjqixPpmfekS012gnGjawy+ryt4XYZR6u X-Received: by 2002:a17:902:e850:b0:178:64f:a57d with SMTP id t16-20020a170902e85000b00178064fa57dmr3532755plg.110.1663855261808; Thu, 22 Sep 2022 07:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663855261; cv=none; d=google.com; s=arc-20160816; b=N426FLGpxX+NssYp79K1HebIQIeirF5k7+b9J6nxubam4fWlfs6/VJLPcnTXOFTK4E eXa8FkeJ5Xo2ZjDtsoCPJA4vZQzx93XvgZeZ4Ccktib2IiN+TDDW9U1bDOXcZvfJzW4K XpKXRCqfPzgtjkf/Dt1W1dnUfbJjiayOAnxO2Nz22Y0BVlXflgnDlGDEPr5WU7tu2bVW YAJjYU024fItIkF7sbtzlJ4/+P2LLdmOZb9BuXLTYmOmCpEAOsFbsWh3FuMiOhbhRPCm /KLMgr4EgcWzKDYBKNrx8xEk815rJimbr8iU9QMQNPI5OgHOOcVvvc7Ya9CEPFRGi5rK MeQQ== 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=ywdK4ChRbZlec/Wxw45KygCvRkJ7281y7JwiJ2QmKMw=; b=aiuV/CR3q5BHNHPjX+n5CBnCsXqrt1y1ZAyuvQvfCvScSeSJpz4C0+oHOodTmg+7YH eMPDi/cJ5B0mcnO0yMiStwDt9oEn3QbpLIbqrOowFsQIT8kKvo9ERuWrTaNLvnx5XI3g 7ADOLYkgJ8tUSk/NUybiGxadvnrswxSRr+cKC3e7ALDcrWUWptRuahEldoewa4kpYJBc gseC2TPd5Jbci1i8mZj0zuM5dxngv5BAynxyOvInogI46qhI5I2VxRZqtCROO8Ni5Yh/ xg1cUySSvKRY1K+1pbJj8xqRCEr9PFJ0ZZ2JndK8nCS4uWf8+bndpAq+4ZTu26beB3bc QN0Q== 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 j6-20020a170903024600b00179988ca61dsi596786plh.510.2022.09.22.07.00.48; Thu, 22 Sep 2022 07:01:01 -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 S231547AbiIVNpq (ORCPT + 99 others); Thu, 22 Sep 2022 09:45:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231295AbiIVNpW (ORCPT ); Thu, 22 Sep 2022 09:45:22 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B0BD33E1D for ; Thu, 22 Sep 2022 06:45:21 -0700 (PDT) Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MYGgw6yTFzHqKS; Thu, 22 Sep 2022 21:43:08 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 21:45:19 +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; Thu, 22 Sep 2022 21:45:19 +0800 From: Liu Shixin To: Andrew Morton , David Hildenbrand , Waiman Long , Zefan Li , Christoph Lameter CC: , , Liu Shixin , Kefeng Wang Subject: [PATCH v3 3/8] mm/slub.c: use hotplug_memory_notifier() directly Date: Thu, 22 Sep 2022 22:18:59 +0800 Message-ID: <20220922141904.3245505-4-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220922141904.3245505-1-liushixin2@huawei.com> References: <20220922141904.3245505-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: dggems702-chm.china.huawei.com (10.3.19.179) 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 --- 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