Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4607693ioa; Wed, 27 Apr 2022 07:23:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9ZVFOK6Vnouu5U0O3UR3dC6cP6sJCjN17HjpiJ2FbO7DqyFHeoDG4lLO8pmuyLyN5g54u X-Received: by 2002:a17:902:d70a:b0:158:7f07:e7c9 with SMTP id w10-20020a170902d70a00b001587f07e7c9mr28835240ply.109.1651069425441; Wed, 27 Apr 2022 07:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651069425; cv=none; d=google.com; s=arc-20160816; b=p//tBtsjG3nUerUmnhjwSUluPH5tORSKmwmj985Q7uT6XRc6bsnFFG3NftEsAkWGMe QMu4HAo4NvC+HMNAl5WoeOSYWiC0rwHfcg1Inv3A6C7cO6ifcvAR40BS0ai7ONKRpQ0y 56kOofbdeUKVlGEu+WYDyjyOd5AbCi/cTwrE9Ot2jnx7fClYaM5KMyk0yd5wMD/COsa4 HdFJFZEy1IvHVk/ZvTrhhxUCoOYTk36McR1gGGqn3RRw6P6/nxj2zU+3B6prYNj0uJJc 8gSxTNaeihrf+TzGHxrGZaueThNsHLPbiKQtPLgE1VJOcqUJDs0yQOcTtHEWz0HUdsPu DZ9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=z0VSn2vEXwWXMGAfap1HPPywpjqAc/nB4nW5xPcHwuA=; b=t6iT+NwItvRLxsNDaahyQiFh54ShbIkj1CfwJitRWRjysnPoOoO7HLyOF9/3LWRGCu h4EjZWxufe/A4aVx2hGjwZLSauNdA2rl1uWK0Km51UV1HblhscKS3LrHTj0490+L89qg 6zrJEy2iqkcO3zNgSW/JMBfOBUV87QmDdVQHHhztambn7+2ZM6xc9n3gRrfVgzsdjz/z BN0usAcXq7TFXlkQHqcK4SYvwre8AairoHe2uIJIO/mbLWEO69xZKaOoWyjbBny+hls9 G7lPoQicbGpKif6KHEev9EnvouzN+QQQmQIn/2+wE068SmovgntDrz0cFg57xtdHNyVU S/SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="f/xNu/kD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id oo5-20020a17090b1c8500b001d1da760127si2252116pjb.57.2022.04.27.07.23.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 07:23:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="f/xNu/kD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 92E6B3A5E3; Wed, 27 Apr 2022 06:53:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236771AbiD0N4l (ORCPT + 99 others); Wed, 27 Apr 2022 09:56:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236700AbiD0N4i (ORCPT ); Wed, 27 Apr 2022 09:56:38 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B5872ACB; Wed, 27 Apr 2022 06:53:27 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2D06321118; Wed, 27 Apr 2022 13:53:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1651067606; h=from:from:reply-to: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=z0VSn2vEXwWXMGAfap1HPPywpjqAc/nB4nW5xPcHwuA=; b=f/xNu/kDIRTMogOu0Uw02XT1TextwCqsKVU5GEime6fEx0GQmAShKNghzduSIpnAvkWvIl 4XLpd3AXnkkx71Us1FiykJTL38kwzzkcISvSZKWwnE24AiQJotbu2LNxhs2RA6jAzmKmeI YWMQC29ImtGt9spIXjuzKoHdmIYLXW0= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DF00713A39; Wed, 27 Apr 2022 13:53:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ehVtNdVKaWJvZgAAMHmgww (envelope-from ); Wed, 27 Apr 2022 13:53:25 +0000 Date: Wed, 27 Apr 2022 15:53:24 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Waiman Long Cc: Tejun Heo , Zefan Li , Johannes Weiner , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Feng Tang , Andrew Morton , Michal Hocko , Dave Hansen , ying.huang@intel.com, stable@vger.kernel.org Subject: Re: [PATCH v2] cgroup/cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp() Message-ID: <20220427135324.GB9823@blackbody.suse.cz> References: <20220425155505.1292896-1-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220425155505.1292896-1-longman@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,TVD_SUBJ_WIPE_DEBT autolearn=no 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 Hello. On Mon, Apr 25, 2022 at 11:55:05AM -0400, Waiman Long wrote: > smp_init() is called after the first two init functions. So we don't > have a complete list of active cpus and memory nodes until later in > cpuset_init_smp() which is the right time to set up effective_cpus > and effective_mems. Yes. setup_arch prefill_possible_map cpuset_init (1) cgroup_init cpuset_bind (2a) ... kernel_init kernel_init_freeable ... cpuset_init_smp (3) ... ... cpuset_bind (2b) > > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c > index 9390bfd9f1cd..6bd8f5ef40fe 100644 > --- a/kernel/cgroup/cpuset.c > +++ b/kernel/cgroup/cpuset.c > @@ -3390,8 +3390,9 @@ static struct notifier_block cpuset_track_online_nodes_nb = { > */ > void __init cpuset_init_smp(void) > { > - cpumask_copy(top_cpuset.cpus_allowed, cpu_active_mask); > - top_cpuset.mems_allowed = node_states[N_MEMORY]; > + /* > + * cpus_allowd/mems_allowed will be properly set up in cpuset_bind(). > + */ IIUC, the comment should say > + * cpus_allowed/mems_allowed were (v2) or will be (v1) properly set up in cpuset_bind(). (nit) Reviewed-by: Michal Koutn?