Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp842444rwb; Thu, 22 Sep 2022 07:07:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5/AQblWbtVsPWYeN58rtNJ++YeVO2OxzsxSluRD7sf1TeyyGRd2JQMhAsCivZr92D99lFT X-Received: by 2002:a17:90b:1c90:b0:203:b7b4:b1cf with SMTP id oo16-20020a17090b1c9000b00203b7b4b1cfmr13207272pjb.160.1663855629501; Thu, 22 Sep 2022 07:07:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663855629; cv=none; d=google.com; s=arc-20160816; b=B6dEZKL8fcSXzS3tYpYPr1EG7Bw2mEpwkfMInwsieVEb2cfCn0QKNgYNmni3qlnm9Z e2+TPTnncpxfwLXjxfa6wQFVhBCYecxU82vRwUX6k2joQKIDta2ZR6lg+m8QL8Nmk/NB dRdBmLknxm4WEru1K9lBuLJ8QwfB65JDjZZfL8FHoapqxU3t1FaohNZnW7H2GHB7LKru fWfy7QgTLbkLwH9oL+mX7NX3m6/bZEaVoN/GRKRkbyMQEvpzPV7KW2xflreMMfcfi5Bh 5hpFtOYkacEWQ4IEWXjFGCUq48nM1M9GDVPlUpWHm07bxaz32lhWeD0KC3jC1MM2D4GC ulDQ== 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=79P+nn/NVK/m0zJHqYKjVUbwkDP3QoT7GGULTNElq/k=; b=J8rNU2t7wOUDpTV5IfETVdtCJW9TYGe1PLXuH8wOYgVhqBjSrOY4Jqc00fwxmj5QKp HpOS4YN9fXWiEEN0aMJZlFB/5oswxbqCTxzZo2AWQE2vOD096yvnu2/gOy84awI6taRd tjYk6esLeXleuygkfuIOm+apw9xybzb3eaS+2rrbLpF78tGDnByk0jfsxgI/CLg+mSq9 45JXbmnnhZof1ON7mhrUhWoqedTvtgWXB6frTaKsby6ZX04lcIU/V0q6E/wMS2z3zFQH zFCBRVg//qaPSdSpWJXXAN90yBQ2otAHMVW3aAEQDit2T0+vXOTEZCG3FCAWmJpmg/iY N7ng== 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.06.56; Thu, 22 Sep 2022 07:07:09 -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 S231700AbiIVNpu (ORCPT + 99 others); Thu, 22 Sep 2022 09:45:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230365AbiIVNpY (ORCPT ); Thu, 22 Sep 2022 09:45:24 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6389D3718A for ; Thu, 22 Sep 2022 06:45:22 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MYGgB5DbHzpTws; Thu, 22 Sep 2022 21:42:30 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500022.china.huawei.com (7.185.36.162) 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:20 +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:20 +0800 From: Liu Shixin To: Andrew Morton , David Hildenbrand , Waiman Long , Zefan Li , Christoph Lameter CC: , , Liu Shixin , Kefeng Wang Subject: [PATCH v3 5/8] mm/mm_init.c: use hotplug_memory_notifier() directly Date: Thu, 22 Sep 2022 22:19:01 +0800 Message-ID: <20220922141904.3245505-6-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/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