[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 7 Jul 2017 16:50:43 +0100
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Viresh Kumar <viresh.kumar@...aro.org>,
Juri Lelli <juri.lelli@....com>
Cc: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
linux@....linux.org.uk,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Russell King <rmk+kernel@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Peter Zijlstra <peterz@...radead.org>,
Morten Rasmussen <morten.rasmussen@....com>,
"Rafael J . Wysocki" <rjw@...ysocki.net>
Subject: Re: [PATCH v2 01/10] drivers base/arch_topology: free cpumask
cpus_to_visit
On 06/07/17 12:15, Viresh Kumar wrote:
> On 06-07-17, 11:59, Juri Lelli wrote:
>> On 06/07/17 15:52, Viresh Kumar wrote:
[...]
>>
>> If that's the case I'm wondering however if we need explicit
>> synchronization though. Otherwise both threads can read the mask as
>> full, clear only their bits and not schedule the workfn?
>
> Maybe not as the policies are created one by one only, not concurrently.
>
>> But, can the policies be concurrently initialized? Or is the
>> initialization process serialized or the different domains?
>
> There can be complex cases here. For example consider this.
>
> Only the little CPUs are brought online at boot. Their policy is set and they
> are cleared from the cpus_to_visit mask. Now we try to bring any big CPU online
> and at the same time try changing min/max from sysfs for the LITTLE CPU policy.
>
> The notifier may get called concurrently here I believe and cause the problem I
> mentioned earlier.
>
I chatted with Juri and your proposed fix to do the unregister before
the free makes sense to us. Thanks for spotting this! I will change in
the next version.
Powered by blists - more mailing lists