Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp388318rwb; Thu, 22 Sep 2022 20:30:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4o4dASfHWVk/0cdgCrjBl5dmz/ahuBvl04b4rAy3P2nSeTfND0qWQWFPnSB/0RZ/qMG95m X-Received: by 2002:a17:907:c25:b0:782:9dc8:eef1 with SMTP id ga37-20020a1709070c2500b007829dc8eef1mr1044558ejc.667.1663903848736; Thu, 22 Sep 2022 20:30:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663903848; cv=none; d=google.com; s=arc-20160816; b=bO3l4F9ZWqx7f7wAqYk9MseM4OjdcuR+g1SMOvRCQ41vkj8Y6Ke0rpN+pHOHdab4MR vOZZ5KDPiwAJSu0dP+t3dknJ8v/zaDDp1L28X5FI9LMDHxwJUpQpH54UaPTcfX8RL7EK mw1gdczPjtHkXQx7YJAxecBxzGBUTEdI/IH4bmx0ePyn9RmXuFlp+nKOsDLMOdXYL+3J 62Yr53X60yAjFHbaMgezxzjjtufn2/AmGDB6s2J4ECRTylHdI59MohVXsgZ47VOi8qua HctfN2lxKP/zXIcYlHLormy60MqaWNCNykwULL4zB9ovg49DdHYbrDXTxKWtq4vOsWbO uDhw== 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=0BDdoCgAecyNVzqEU0QE8VxODYXiGcDvZ120MwiRPok=; b=AhLCObwMn6nmDHQtVLWmjwCNPNZz+p/sXa6HsiIl7MJB5Rs8Q3pvr2i20WkFF2JKFd H/BMWoLgkVtYEGvIkWaiCzaX0exO0Y/SALxVBVw2ScRBXK8Dm0Dko3EVrmWEqnjVJtAR ae1+jzHgC7Tmx9oJ5E8QsUu5K1r/eOYmnpLnftvpl5WfX4/UEocmqJSgb1cWgScIhmRL Xwv4fA2EuqptAmAgqvya20B69oZNBTXytWpcm9KNezwkqGDEAS+4v9boUeZCv9xxwTxL iXdeugS7rGeuFwxkeCGUPu/qnwmjOcfxQmi+qXd+GDsaXvA+QoY8maD+A7h6zOXpV/gX 4SFQ== 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 f11-20020a0564021e8b00b00447a70e89e2si8561518edf.195.2022.09.22.20.30.23; Thu, 22 Sep 2022 20:30:48 -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 S231938AbiIWDAk (ORCPT + 99 others); Thu, 22 Sep 2022 23:00:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231201AbiIWDAQ (ORCPT ); Thu, 22 Sep 2022 23:00:16 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC11B5AC5E for ; Thu, 22 Sep 2022 20:00:13 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MYcH15JCVzWgnw; Fri, 23 Sep 2022 10:56:13 +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; Fri, 23 Sep 2022 11:00:11 +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:11 +0800 From: Liu Shixin To: Andrew Morton , David Hildenbrand , Waiman Long , Zefan Li , Christoph Lameter CC: , , Liu Shixin , Kefeng Wang Subject: [PATCH v4 5/8] mm/mm_init.c: use hotplug_memory_notifier() directly Date: Fri, 23 Sep 2022 11:33:44 +0800 Message-ID: <20220923033347.3935160-6-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/mm_init.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/mm/mm_init.c b/mm/mm_init.c index 0d7b2bd2454a..44aadc162d1f 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -178,16 +178,10 @@ static int __meminit mm_compute_batch_notifier(struct notifier_block *self, return NOTIFY_OK; } -static struct notifier_block compute_batch_nb __meminitdata = { - .notifier_call = mm_compute_batch_notifier, - .priority = IPC_CALLBACK_PRI, /* use lowest priority */ -}; - static int __init mm_compute_batch_init(void) { mm_compute_batch(sysctl_overcommit_memory); - register_hotmemory_notifier(&compute_batch_nb); - + hotplug_memory_notifier(mm_compute_batch_notifier, IPC_CALLBACK_PRI); return 0; } -- 2.25.1