lkml.org 
[lkml]   [2014]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/5] cpufreq, dbs_data->usage count must be atomic
From
On 5 November 2014 20:23, Prarit Bhargava <prarit@redhat.com> wrote:
> The usage_count value can be modified from several cpus concurrently if
> !CPUFREQ_HAVE_GOVERNOR_PER_POLICY. This leads to a variety of panics in
> which the usage_count is negative or exceeds the number of cpus in the
> system. It must be switched to atomic_t and protected with a mutex to make sure
> that future read/writes obtain the correct data.

I think it would be best to serialize calls to ->governor() with some
locking in place
instead of adding per-variable locks. There can be other points of
contention as well.

I have done something similar in the solution I tried. Can pick some
of those patches.


\
 
 \ /
  Last update: 2014-11-11 05:21    [W:0.102 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site