Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1150006lqt; Sat, 20 Apr 2024 02:52:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXnFbjn7L5w6IBvWLkgEGRjK/rdGi6oRojcuntcJLXmjwwlTqzfhwTy8D3kjIF8hPpzktR5ZqxkcQTLTwtTsA9nGsGNKECUVo/TeIURuA== X-Google-Smtp-Source: AGHT+IGdlIJ2SKiBTUwMXqQKR/00J5rlESpGh6H/yaNWp1UgtfclpJlSiku8/e2xBAhhiHIX1eXf X-Received: by 2002:a05:6a00:179c:b0:6ec:ed90:65ea with SMTP id s28-20020a056a00179c00b006eced9065eamr6398924pfg.32.1713606777644; Sat, 20 Apr 2024 02:52:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713606777; cv=pass; d=google.com; s=arc-20160816; b=gaM0X4WZddGM1Y9j7iaNBX9G7SOUZFYUc+15GGIpCb+UPslGADwsbFSJqndVgyqqc6 IClsNuJeVhkN0VlOZM31sgTPWK+3DIEGntiXjiw3L8BE2EGgVp+I5L/omYhCUeOXFGjt QFa20nko609pz9D/WLKN9yzaEpCu8HAgVjzTtLvqPqHPe5x8/Nt7LtW2gteYfw7ndrW1 P7Pj2zROBo4FSC6tJaDMRnDJer9JGQNG+RS5cixcO4ecOfNk1DgO9/+8ej5uee7jf4sf eDiQg8EtlKamOkvCKMQTtMEcdmb1YHYe+LvifgfiYhsOBoUwqPwNTy+gTvFnyMPU/q5f +ynQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=78tPhuu7L/P3WbW+G5EXDNZ5KZEclnMcq6Zgs1qe6TQ=; fh=GAsBSnfpf5FUVQQ6kd9dqsBkwIL387UZSVRwt6d+Yp8=; b=noSDiQZea50NR0GfwFvjJSwuyQlOGXHxlzjXrOHC7IUIolD8cBKW7259K5HzE8TruT s74lksLhANoSGQL0fH7YX9N0HmqxMDJNPaiu2odUYdIQbXjdwoKesKugeSlizdTy2r4J c7BTPLG52SkJdjvkvBuSklHK2vJc+9ynxVXVXNPITkI0jR5DsaDYwl/bWBQqF9IWmnR/ eRwEsCTxNmuovQvF1tl0VZ+N7KxXH3iHNroqf9CIzmhHoFM8QXzZIJlWwuF6RTNgT7uH ElONSEHsajPQJZWLfr1QF+V1N156+cMeNQX5zDxBcOPatZvUUEjjO+tBsdejyQoY9iEx 54xQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-152218-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152218-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d15-20020a63734f000000b005e838ac3123si4562713pgn.777.2024.04.20.02.52.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 02:52:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152218-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-152218-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152218-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4490A281EAD for ; Sat, 20 Apr 2024 09:52:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94C6A17BCB; Sat, 20 Apr 2024 09:52:50 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A96C514AA8; Sat, 20 Apr 2024 09:52:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713606770; cv=none; b=Tm5+DPBr/1fNdPd8xSiyluUElVx/3wiAQ+nOeO7iFPRyRsK4H7wOAA+WYRUsvcKjyrTwdljVjJWJqcbltQKAGmKt+fkkv+aoa8OMBpn/p0Wmx7kUNQ1DUXSdNF7qTSLA84gXqYE05Qn0vlSJ3Gt5M4ps0Zl4Vv+aa4JAX/jUFkQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713606770; c=relaxed/simple; bh=e2kqeueujkKxoJOk8RoZfK74GHevzNEQ7bblI9EcQyA=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=GeD57hJh7hyAy9mh3zSIf0EjIYMYHrFZnfQW6BxvWnYHF8WRGMC8RhlYbuKKRzgfVlpAD3qwYRlmnAaoM0oPueYR3x+ICQ1ey6hq37BwO6tFtw/iT3maEJG2MRoS50YXnf2+qzaW4u7svvFHpfhj6kEBFAuR26BNcgJpvs0AtRo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.252]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4VM6Dr53mtzdbFy; Sat, 20 Apr 2024 17:49:48 +0800 (CST) Received: from dggpeml500023.china.huawei.com (unknown [7.185.36.114]) by mail.maildlp.com (Postfix) with ESMTPS id 22AE518007D; Sat, 20 Apr 2024 17:52:45 +0800 (CST) Received: from hulk-vt.huawei.com (10.67.174.26) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Sat, 20 Apr 2024 17:52:44 +0800 From: Xiu Jianfeng To: , , , CC: , Subject: [PATCH -next] cgroup/cpuset: Statically initialize more members of top_cpuset Date: Sat, 20 Apr 2024 09:46:16 +0000 Message-ID: <20240420094616.1028540-1-xiujianfeng@huawei.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500023.china.huawei.com (7.185.36.114) Initializing top_cpuset.relax_domain_level and setting CS_SCHED_LOAD_BALANCE to top_cpuset.flags in cpuset_init() could be completed at the time of top_cpuset definition by compiler. Signed-off-by: Xiu Jianfeng --- kernel/cgroup/cpuset.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index d8d3439eda4e..e70008a1d86a 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -369,8 +369,9 @@ static inline void notify_partition_change(struct cpuset *cs, int old_prs) static struct cpuset top_cpuset = { .flags = ((1 << CS_ONLINE) | (1 << CS_CPU_EXCLUSIVE) | - (1 << CS_MEM_EXCLUSIVE)), + (1 << CS_MEM_EXCLUSIVE) | (1 < CS_SCHED_LOAD_BALANCE)), .partition_root_state = PRS_ROOT, + .relax_domain_level = -1, .remote_sibling = LIST_HEAD_INIT(top_cpuset.remote_sibling), }; @@ -4309,8 +4310,6 @@ int __init cpuset_init(void) nodes_setall(top_cpuset.effective_mems); fmeter_init(&top_cpuset.fmeter); - set_bit(CS_SCHED_LOAD_BALANCE, &top_cpuset.flags); - top_cpuset.relax_domain_level = -1; INIT_LIST_HEAD(&remote_children); BUG_ON(!alloc_cpumask_var(&cpus_attach, GFP_KERNEL)); -- 2.34.1