Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2208031rwb; Mon, 19 Sep 2022 01:04:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5m8O2uMYvJc/ZG1pRHvmZBIr0WKB50KvTu9HPPdIv9RrcfhBo869LNiaBF9jBphciXZz40 X-Received: by 2002:a17:90b:2c0d:b0:202:54a1:d502 with SMTP id rv13-20020a17090b2c0d00b0020254a1d502mr19035371pjb.70.1663574664544; Mon, 19 Sep 2022 01:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663574664; cv=none; d=google.com; s=arc-20160816; b=1DiVM/9VWxsPr+YCVSke64Nf93mrv+5XkBFYgxQrfzjuQa6tXvyAn8HMhYB1mTFVTw qJSF/go9Rroa+ezl/eC4AVhFH3n8tyPj9Lm2qcmfFp2iXIZ0oAQ+au37QYMIgtYKn5+k mTlsJCLnyRgzF9GT/kpEoN5yU/VM9ga7HjwLWQIpZEtv0lsGQoxY3jB26wIhp6DqqUSq ozpjw9lca7oC3azcoHghuDto0cbla+gIegEAcWFjLi6bQb0svVkEfCRlW+4FttmfJKMq ZA9ANyHSCQGl9ySGuYp1CJOYmRqUOy1d0BOO93kZyFRopaz06XljtmcRJMX5hEJ84CC9 PlJA== 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=m6uu7VV9TcdM4ybjJYoxygcgwn+ic/df3Q7mv6+/CxkKruYKc5WR20GdL+9ihio/mX kzTROAmY7FxOjkBg+Jw1196uOJe2Qhtq924/0Ds9NdG5ZGBpTMF3KYGPg1dLzriPKwi/ lIRR8HKx6wuCvSjIowGTP3Qh/hUCSe5L9NsifJITgQo3SKQg5CITYLmlJdHKK0u+EPAv cQ8Ho1O6Hy2ZjL4XOO8iQGZC+OURbenBz/7CLmw/8HURpQOTy5C1auG95G5hqdh43UnK y7tpBkz6dHwaWFcRyDMJPnIegU7vekxDIO629epnWj23OkIUgyPWQfPDFkoDPSimaIxs 0H2w== 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 w9-20020a63c109000000b0043895127033si18793824pgf.335.2022.09.19.01.04.11; Mon, 19 Sep 2022 01:04:24 -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 S229964AbiISH6T (ORCPT + 99 others); Mon, 19 Sep 2022 03:58:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229810AbiISH6L (ORCPT ); Mon, 19 Sep 2022 03:58:11 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE1D81EEEA for ; Mon, 19 Sep 2022 00:58:09 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MWH3r2ng7zMn3c; Mon, 19 Sep 2022 15:53:28 +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; Mon, 19 Sep 2022 15:58: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; Mon, 19 Sep 2022 15:58:07 +0800 From: Liu Shixin To: Andrew Morton CC: , Liu Shixin , "Kefeng Wang" Subject: [PATCH 3/9] mm/slub.c: use hotplug_memory_notifier() directly Date: Mon, 19 Sep 2022 16:31:46 +0800 Message-ID: <20220919083152.1824305-4-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220919083152.1824305-1-liushixin2@huawei.com> References: <20220919083152.1824305-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: 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=-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