[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3791e950-d997-23c0-07ff-909fd170d0a7@redhat.com>
Date: Wed, 27 Apr 2022 10:33:04 -0400
From: Waiman Long <longman@...hat.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: Tejun Heo <tj@...nel.org>, Zefan Li <lizefan.x@...edance.com>,
Johannes Weiner <hannes@...xchg.org>, cgroups@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Feng Tang <feng.tang@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...nel.org>,
Dave Hansen <dave.hansen@...el.com>, ying.huang@...el.com,
stable@...r.kernel.org
Subject: Re: [PATCH v2] cgroup/cpuset: Remove cpus_allowed/mems_allowed setup
in cpuset_init_smp()
On 4/27/22 09:53, Michal Koutný wrote:
> Hello.
>
> On Mon, Apr 25, 2022 at 11:55:05AM -0400, Waiman Long <longman@...hat.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@...e.com>
>
Thanks for the review. I plan to post v3 with updated commit log and
comment soon.
Cheers,
Longman
Powered by blists - more mailing lists