Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2208885rwb; Mon, 19 Sep 2022 01:05:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7vw5RaFJ4+hq7rjE1Td8B2hX0XFquxgEjVIFtcD6ksXwo6JbyXGRhtIM0I3Ejlf6X1r44r X-Received: by 2002:a05:6a00:b42:b0:544:a61b:75e3 with SMTP id p2-20020a056a000b4200b00544a61b75e3mr17445571pfo.26.1663574718378; Mon, 19 Sep 2022 01:05:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663574718; cv=none; d=google.com; s=arc-20160816; b=CCny98oYhRbakpiEUvwAjVXoSZFrlk7Y+ntia3wE8OQnPU58yFX8Ew6camjT176ORs 9KOiAx0ybhwVb3NjHkSgZ08/muSFdkyOBJKL/f0Z+KmjXPd2GEbqikL2s9v2RJS3/Q3a bo3z6gURprH3zwSZGlA8p+j2DilAiRNuUsPDUlHrRjVONlv/xMF+HcscsszUekQMHIbD XSNr/IYWjZFh8/wPGr12G4OZQ8fVcD1nnQA/NqHrky6I6yxBezUh0WpN+kkVNyQsl9yW 3C4DrCojOj0X2xxioFnqKMuKlgjF5YHBkoRW6kSgogq2NqDhLGCE4tYgIhbS5jkd3lZE pmjg== 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=ldjcxa5lxDpMjrXeAAHkXdh/HoFfNfbQUaa+WOalydM=; b=UHyyzAg5fTdtMkwo/QjoANhT/SND2nlPOYcwcrs6F/fcXu4McFzcS2W+Cvjj7VD/z7 wKGVXr24KT7RikCaXsEn0m4ypNo5iI3vtdgdDRnmZjYyPu9VbsXtO4Uy54mCo/bHmzDI DDqG1oqUFZn2pg4J7NqufdhXUi+WIYT5KndutI49xEJgz37wSOKyKTJpwog2EQ8jAGye sfy/R7PwEQuZ7M5NRxs2EQ7IgUocKqlzm9KAjrIZ07T/sHhX2q9pkndVYwnTe89zF1IC Vn6ga8acAtXfn9hMe6V1ussLrm3NUy5kUbN4FowrlEF1uxvHqD35q8rP+lrbv5pmak0O EioQ== 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 m9-20020a635809000000b0043908386679si23479098pgb.373.2022.09.19.01.05.07; Mon, 19 Sep 2022 01:05:18 -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 S229746AbiISH6b (ORCPT + 99 others); Mon, 19 Sep 2022 03:58:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbiISH6L (ORCPT ); Mon, 19 Sep 2022 03:58:11 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99EBD1EEF8 for ; Mon, 19 Sep 2022 00:58:10 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MWH4X4mHYzlVl3; Mon, 19 Sep 2022 15:54:04 +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; Mon, 19 Sep 2022 15:58:09 +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:08 +0800 From: Liu Shixin To: Andrew Morton CC: , Liu Shixin , "Kefeng Wang" Subject: [PATCH 5/9] mm/mm_init.c: use hotplug_memory_notifier() directly Date: Mon, 19 Sep 2022 16:31:48 +0800 Message-ID: <20220919083152.1824305-6-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/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..ec6989fcf762 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