lkml.org 
[lkml]   [2016]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/10] cpufreq: governor: Use common mutex for dbs_data protection
On 05-02-16, 03:14, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Every governor relying on the common code in cpufreq_governor.c
> has to provide its own mutex in struct common_dbs_data. However,
> there actually is no need to have a separate mutex per governor
> for this purpose, they may be using the same global mutex just
> fine. Accordingly, introduce a single common mutex for that and
> drop the mutex field from struct common_dbs_data.
>
> That at least will ensure that the mutex is always present and
> initialized regardless of what the particular governors do.
>
> Another benefit is that the common code does not need a pointer to
> a governor-related structure to get to the mutex which sometimes
> helps.
>
> Finally, it makes the code generally easier to follow.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Acked-by: Saravana Kannan <skannan@codeaurora.org>

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

--
viresh

\
 
 \ /
  Last update: 2016-02-05 08:21    [W:0.588 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site