Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2237929rwb; Mon, 19 Sep 2022 01:46:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5MpR/dvKz8PIl7gb99qvBBRdvyPlm1ohAtZLISYGyyRBksLG36U32H36TW/8UY/7AHqwTa X-Received: by 2002:a05:6402:b85:b0:44e:dad7:3e24 with SMTP id cf5-20020a0564020b8500b0044edad73e24mr15202937edb.264.1663577180254; Mon, 19 Sep 2022 01:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663577180; cv=none; d=google.com; s=arc-20160816; b=OH61+N52/UMAzaF86HIXuRnhyXUpeCZXeLcEZ9YGNnvr9XWOKcr2fZPRnhlvXIKSxN NgQo4vhEyTPt2Cj7aMcGuHVtpvey0RWX6vS2faOVB41bip1iceov1aYqATgws4ORZmQI NFmmDA9WRi7jcpaWtehNdGx5XxrUddGycrBibZ6dbgDYdD1ceNHHEtLsQ3lJNyyACmVT RTvHJWXdSARVqx7OQ1ViAcv284QDjiKzrwkOAHkq3XYod5Cjwhzo0BWaeI6fVlJFvJxs 5D2noumUZNO0lrl28b3tHTCZsfJyblQKgOQxf257iB/Kzh05zlomMF8Ol3Y5ISj7OUoC zV2A== 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=JuA04Vvd0Lkomb9eLNv46coLV0RK9pwlvuFPP4WZoGY=; b=q2KEdJOS6NcK+yqmLJQwqJVtnK1kKsmDAMClSjRs4AFvjyPDzlpWTTD39ccOhoAWaa NSfwgO/1ntb2uLx7ukpBDCoTRbV1oPfcl/1dlcG02d4TcmyJKxMWsBWztH9tQ2chro7c /XjSjdDs8LQE1iwa1GjVb8wkJiyXx6nYJuBVIG0sPJNYjOeomQaSRk6GMqR2T6Vx0TTU +LN9x7G6D88nt4SFzOVBNT0xZpea9Lab3jWuh6DX9Hrps1nWs1Q+p9WNS1aV8YawMEr5 XrxqcmGFBHuorvGBJ2kMdWdHkbW7t4/jzDHmAOc0Zbjp78QfQEZfiA060yc4dKgsmpz1 /oGA== 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 z2-20020a05640240c200b0045181429f39si11412615edb.55.2022.09.19.01.45.55; Mon, 19 Sep 2022 01:46:20 -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 S229610AbiISH6N (ORCPT + 99 others); Mon, 19 Sep 2022 03:58:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229650AbiISH6L (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 790521EEDC for ; Mon, 19 Sep 2022 00:58:09 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MWH3q4TKczMn3p; Mon, 19 Sep 2022 15:53:27 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500024.china.huawei.com (7.185.36.203) 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 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 1/9] cgroup/cpuset: use hotplug_memory_notifier() directly Date: Mon, 19 Sep 2022 16:31:44 +0800 Message-ID: <20220919083152.1824305-2-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 --- kernel/cgroup/cpuset.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index b474289c15b8..0c6db6a4f427 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -3630,11 +3630,6 @@ static int cpuset_track_online_nodes(struct notifier_block *self, return NOTIFY_OK; } -static struct notifier_block cpuset_track_online_nodes_nb = { - .notifier_call = cpuset_track_online_nodes, - .priority = 10, /* ??! */ -}; - /** * cpuset_init_smp - initialize cpus_allowed * @@ -3652,7 +3647,7 @@ void __init cpuset_init_smp(void) cpumask_copy(top_cpuset.effective_cpus, cpu_active_mask); top_cpuset.effective_mems = node_states[N_MEMORY]; - register_hotmemory_notifier(&cpuset_track_online_nodes_nb); + hotplug_memory_notifier(cpuset_track_online_nodes, 10); cpuset_migrate_mm_wq = alloc_ordered_workqueue("cpuset_migrate_mm", 0); BUG_ON(!cpuset_migrate_mm_wq); -- 2.25.1