Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2470778lqt; Mon, 22 Apr 2024 11:35:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMvKmfNRo32DbhPGgY6mePYbt1VT+TRXS22/42cWbk57yz/S7abXPIp4fAxE7WAbXYFFs62J1GoeatxQQ2qNuGTHuD5TVjCaVpT+6m6g== X-Google-Smtp-Source: AGHT+IEFDyVw9Ndo4X12pltYC2Y91xzugUopsVrR7kLVOGP6qrzyAyYb/2Y+M2TBk6+Drchv9nHd X-Received: by 2002:a17:902:8c91:b0:1e4:5b89:dbfa with SMTP id t17-20020a1709028c9100b001e45b89dbfamr10126998plo.41.1713810903106; Mon, 22 Apr 2024 11:35:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713810903; cv=pass; d=google.com; s=arc-20160816; b=zsqx4X9JoX4V6qZdceCl7dFW5K/Gw/EpIktz/7XL/Z1TzKaHUNH8OMiOMgewk+nO6O apEUcSmLn/BkqZNWkwDJ5iobdYD5wC19O8pIyn0BrtH0tvdqzMw2yKoZx5QyycPX/S9R C9/hXCudf2AJg1YDOwW4T7483nHpzLO0YX9vqto5UK20QaNY6A90WVW86VoQfvtUNej/ 534nNKWsD01jLOv8s3ja8R1g14BufHEtqiAC4eKcJvmZYkoAYIrIHVQcWtQG2hz9qGGt 4019hHN6ISiwzL0nPPThxkZbsjRccc1FbY40fDGPbRT4olgFlc4RLImu0fR2Yq04tYOT /UqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=YEAqeumfUHtzhzMhX5s4xQkZKWe9CxlywrZ+mXyPh60=; fh=H4UMJDtxejWT8MoSRyTn71QzRR5CrCcXuRBwqCo5b8s=; b=JtJZ5s7KEYyRPCGzJmb+RiZjo5YAwZXR67ihvaJK4BUMa7E+ftaIJO5aKrhYC+bCKG ab3ZG3WE/GbaHAT9lSeA0NfJttMKIq9RX3UxMGooGx2/4Y9cThFshC4euNaG2hUGtB6E Li5KN66hUooDP5XejzCfjZOt33KzFX6oQllaEVvzNGrJnsvqoA6BzEeqeYsfO1VZe271 tpG3lhqVcOGnPxNk7dP2TNk+2Z3LTgrYq1Z4GCpSdAItRfWitJmNt7j5mdkQRdSi4HTX oyHvK0/drHEw0oWRRUVlyrDc1BSGLfEmahJ8tf19jsKKNWERtmj8cR078hDrND7THacP nPbA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ah9Rt0dW; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-153841-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153841-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id o8-20020a170902d4c800b001dcb3207229si8078390plg.209.2024.04.22.11.35.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 11:35:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153841-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ah9Rt0dW; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-153841-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153841-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4FE48B22585 for ; Mon, 22 Apr 2024 18:34:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A777715443D; Mon, 22 Apr 2024 18:34:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ah9Rt0dW" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 60A4013EFE1 for ; Mon, 22 Apr 2024 18:34:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713810890; cv=none; b=mD1yrzbGHVmfQHIPaEAglD9EnGQPLfRE0ya6Ox2tZcnObSX/S7uMvcXenXWyTTDJs7vVjr09POveIwctLAUlIbFtSgsSbaMWGN6b/Vu56zVbQWUt0t3WNJT/KhQaXCba58PYGgx8Up+Mg+wSqMkDbCROZqvvJEryGXUCrQxpUmQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713810890; c=relaxed/simple; bh=qHyu+uP/D6tYcq7d7yU8GqFnJIfU/FEYzQVpzIwder4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bVXcszbscYM9HSqKo5tY5IM3wB6wzg3eU4KFMWLibfA45U6V37MxfQbwbLJ9FMBJqsXU+1wZ0OwRawHK3pfVHFH0BcnpXGJeVmsGHtldLwaxmWocaOjFiMSQq3MvFHG8UwY7qZoWqT2gYE2sjRYVjJ1rCX8qcZ8lBfa0GKhVjyg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ah9Rt0dW; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713810888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YEAqeumfUHtzhzMhX5s4xQkZKWe9CxlywrZ+mXyPh60=; b=ah9Rt0dWIxQsj3rlwPdPTfhf8UHdsCOYlMQEaLB8zWanUx7gloQM5J/tQefEVP1HHUOfNy mns35GtEekL23qhcWScjSEXzLdznYi271ZwpAYsMUKgYwK087ADqdRUla93aBhk7j1KZwl ulRlJaGYI1MLnKdnOv+fUk2cxYKHAZo= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-169-wYztvbUzMgmSbrcjVJQfOg-1; Mon, 22 Apr 2024 14:34:46 -0400 X-MC-Unique: wYztvbUzMgmSbrcjVJQfOg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BB62C3C3D0C5; Mon, 22 Apr 2024 18:34:45 +0000 (UTC) Received: from [10.22.32.240] (unknown [10.22.32.240]) by smtp.corp.redhat.com (Postfix) with ESMTP id 47032581DF; Mon, 22 Apr 2024 18:34:44 +0000 (UTC) Message-ID: Date: Mon, 22 Apr 2024 14:34:44 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH -next] cgroup/cpuset: Statically initialize more members of top_cpuset To: Xiu Jianfeng , lizefan.x@bytedance.com, tj@kernel.org, hannes@cmpxchg.org Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240420094616.1028540-1-xiujianfeng@huawei.com> Content-Language: en-US From: Waiman Long In-Reply-To: <20240420094616.1028540-1-xiujianfeng@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 On 4/20/24 05:46, Xiu Jianfeng wrote: > 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)); Reviewed-by: Waiman Long