Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp393108rwb; Thu, 22 Sep 2022 20:35:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5KXDKMBz38N+t5IZdqM7ApNsY6c483s/AQ0ueGLqf05yqNLVdL3pIrQN1s5+b++E4MjXja X-Received: by 2002:a63:b64:0:b0:439:8143:c184 with SMTP id a36-20020a630b64000000b004398143c184mr5809613pgl.22.1663904150890; Thu, 22 Sep 2022 20:35:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663904150; cv=none; d=google.com; s=arc-20160816; b=wKRxWKipZYFT5tgsMPS7vO0Tv3lHSSIL5G0MmiGof0acYqIi+ThodsP07G5n3rIo0A QNDa2WCdk5Uupe/vUaKtoI/ucA3vFOTIx3c2yZQYvFpCjO4vtMUi3BRngoqNkFill4W4 QHTJSsu6kIlFS6kdxLzhVx0Sr5HuT1e8HDHjcwsRDp74KI9aMUFE6dbOBaNusCjfr8jL gn69p/wIt6bwKyrwYiVX02TQCX/hvSh5iE6h+0koRqXXyt0t4uVe2jbp3UouCHGAItK2 61DGlc1fNZZcd9VuinTYrm/TD4WzhOzxfAecaZZ/bgJSFudY36fKcetHRKvT1Ml9p6Mj Fvbg== 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=uwny7hUb2g5Pam11z/cVgSHZpi1zTLJ9YdgS8TOrTw8=; b=fu0T1up9MFtj4+8xdSLDvuVu41X9B9O/682GgJgxhcsBgGSu3C4bvvFiNjO1bbMG4P HAjdyKbrN8FJHvIyGia847/UIMImoJlNjlxHX+d0fpYlIXtQtGmPzOFzQvaq7KQWOi0n P3NYyGcYhRrD/CwiCbqcdBAVdv2UuUi6GNq1fST70IgvTkA1+y9BAjHzAZ4+/xN8sBX4 NNfHResGrFl1tqC4duwx5VnvmFz1PHu/Z0GWuRImOikCH43AT1rb88mO7sVWtwj8wkvO OqGKG0xRAAPqdXcEghzKFoBcXEyj5uHRhsl2nnmAAPnXVzmHp7SYqy/DOuqaw8576hnj ZzDA== 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 ay10-20020a17090b030a00b00202c01bfee8si1325672pjb.80.2022.09.22.20.35.40; Thu, 22 Sep 2022 20:35:50 -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 S231576AbiIWDAV (ORCPT + 99 others); Thu, 22 Sep 2022 23:00:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230042AbiIWDAQ (ORCPT ); Thu, 22 Sep 2022 23:00:16 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8011C659D8 for ; Thu, 22 Sep 2022 20:00:11 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MYcGm5Nhzz1P6nv; Fri, 23 Sep 2022 10:56:00 +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; Fri, 23 Sep 2022 11:00: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; Fri, 23 Sep 2022 11:00:09 +0800 From: Liu Shixin To: Andrew Morton , David Hildenbrand , Waiman Long , Zefan Li , Christoph Lameter CC: , , Liu Shixin , Kefeng Wang Subject: [PATCH v4 1/8] cgroup/cpuset: use hotplug_memory_notifier() directly Date: Fri, 23 Sep 2022 11:33:40 +0800 Message-ID: <20220923033347.3935160-2-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 --- 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