From: Waiman Long <longman@redhat.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: Tejun Heo <tj@kernel.org>, Zefan Li <lizefan.x@bytedance.com>,
Johannes Weiner <hannes@cmpxchg.org>,
cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Feng Tang <feng.tang@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@kernel.org>,
Dave Hansen <dave.hansen@intel.com>,
ying.huang@intel.com, stable@vger.kernel.org
Subject: Re: [PATCH v2] cgroup/cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp()
Date: Wed, 27 Apr 2022 10:33:04 -0400 [thread overview]
Message-ID: <3791e950-d997-23c0-07ff-909fd170d0a7@redhat.com> (raw)
In-Reply-To: <20220427135324.GB9823@blackbody.suse.cz>
On 4/27/22 09:53, Michal Koutný wrote:
> Hello.
>
> On Mon, Apr 25, 2022 at 11:55:05AM -0400, Waiman Long <longman@redhat.com> 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ý <mkoutny@suse.com>
>
Thanks for the review. I plan to post v3 with updated commit log and
comment soon.
Cheers,
Longman
prev parent reply other threads:[~2022-04-27 14:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-25 15:55 [PATCH v2] cgroup/cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp() Waiman Long
2022-04-26 3:23 ` Feng Tang
2022-04-26 14:58 ` Waiman Long
2022-04-27 1:06 ` Feng Tang
2022-04-27 2:34 ` Waiman Long
2022-04-27 12:09 ` Feng Tang
2022-04-27 13:53 ` Michal Koutný
2022-04-27 14:33 ` Waiman Long [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3791e950-d997-23c0-07ff-909fd170d0a7@redhat.com \
--to=longman@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=dave.hansen@intel.com \
--cc=feng.tang@intel.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan.x@bytedance.com \
--cc=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=stable@vger.kernel.org \
--cc=tj@kernel.org \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).