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 769C3C54EE9 for ; Fri, 23 Sep 2022 03:00:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 30A29940007; Thu, 22 Sep 2022 23:00:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2B8BA80008; Thu, 22 Sep 2022 23:00:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1842794000A; Thu, 22 Sep 2022 23:00:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 0A697940007 for ; Thu, 22 Sep 2022 23:00:16 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id D6EEDAB764 for ; Fri, 23 Sep 2022 03:00:15 +0000 (UTC) X-FDA: 79941846390.08.EC7274F Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf17.hostedemail.com (Postfix) with ESMTP id 443884000D for ; Fri, 23 Sep 2022 03:00:15 +0000 (UTC) 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: 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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663902015; a=rsa-sha256; cv=none; b=NVBCuHd/Wrxk1oaSrRhLkkGYHG4QSpHyEoLCw9cL9nXCyIwgJPQYkpyRI9zJJNKBUQd7Jt 0TnqRzQTwg731ajYdcZlsXC9nzePIQCAXbLBxvC89KWmr60TdPkD8N9/qwXm8JtpEvRyJ1 gUezWG/53Im1evtCzus3z3MhS+H2e+M= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf17.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=liushixin2@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663902015; 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:in-reply-to:references:references; bh=nRDi6gIYJ3AnkdWAZd3CsrgliE0nPpZ0Nty64WxOg80=; b=p3rRwPfAdQt24yh0nXgxCRQz+5SA8sb84XGKnG0GuwliiUO9ZDQv68ei5YmKdAfeghYSBz Q3bRYESV8Y+h0rhB/BbZ9+rfv44cebRhlt5hLPSs+HE2NnpKfwtfJaTqTlBXDd2ljmN8lB K8UPw0E28PdLhkHxuDpF7swG7ddaYBA= X-Stat-Signature: s81mqxobckqsuqon63ribjrye9ktka7b X-Rspamd-Queue-Id: 443884000D X-Rspam-User: X-Rspamd-Server: rspam08 Authentication-Results: imf17.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf17.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=liushixin2@huawei.com X-HE-Tag: 1663902015-442244 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: 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