lkml.org 
[lkml]   [2009]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] CPUFREQ: Remove unneeded dbs_mutexes from ondemand and conservative governors
On Thu 2009-06-25 16:01:24, Thomas Renninger wrote:
> Comment from Venkatesh:
> ...
> This mutex is just serializing the changes to those variables. I could't
> think of any functionality issues of not having the lock as such.
>
> -> rip it out.
>
> CC: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> Signed-off-by: Thomas Renninger <trenn@suse.de>

> static struct dbs_tuners {
> @@ -236,10 +222,7 @@ static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused,
> if (ret != 1 || input > MAX_SAMPLING_DOWN_FACTOR || input < 1)
> return -EINVAL;
>
> - mutex_lock(&dbs_mutex);
> dbs_tuners_ins.sampling_down_factor = input;
> - mutex_unlock(&dbs_mutex);
> -

You'd need to make s_down_factor atomic_t for this to work....
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2009-07-01 11:05    [W:0.913 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site