[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <xhsmh7d7wni6i.mognet@vschneid.remote.csb>
Date: Mon, 11 Apr 2022 09:22:13 +0100
From: Valentin Schneider <vschneid@...hat.com>
To: Huang Ying <ying.huang@...el.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org, Huang Ying <ying.huang@...el.com>,
Valentin Schneider <valentin.schneider@....com>,
Ingo Molnar <mingo@...hat.com>, Mel Gorman <mgorman@...e.de>,
Rik van Riel <riel@...riel.com>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Subject: Re: [PATCH] sched,topology: Update sched topology atomically
On 08/04/22 17:52, Valentin Schneider wrote:
>> + topology = rcu_dereference(sched_numa_topology);
>> + for (i = 0; i < topology->nr_levels; i++) {
>> + if (!topology->masks[i][j])
>
> If I got default_numa_topology right and it's meant to be static,
> sched_numa_topology->masks can still be NULL, but here this would be gated
> by nr_levels being 0... Did I get that right?
>
Being a file-global variable, that's already init'd-as-0, (I'll use
my longish break as an excuse for forgetting that one), but the rest still
applies.
>> break;
>> - cpu = cpumask_any_and(cpus, masks[i][j]);
>> + cpu = cpumask_any_and(cpus, topology->masks[i][j]);
>> if (cpu < nr_cpu_ids) {
>> found = cpu;
>> break;
>> }
>> }
>> -unlock:
>> rcu_read_unlock();
>>
>> return found;
>> --
>> 2.30.2
Powered by blists - more mailing lists