lkml.org 
[lkml]   [2012]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpufreq: Fix sysfs deadlock with concurrent hotplug/frequency switch
On 07/20/12 03:05, Rafael J. Wysocki wrote:
>
> The following part of your changelog has confused Patchwork. I guess it
> will also confuse other tools, so care to describe what to do instead?

Sure. I thought that might happen but I put a space in front in hopes it
wouldn't cause troubles.

>
>> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
>> index a290771..62af12d 100644
>> --- a/drivers/cpufreq/cpufreq.c
>> +++ b/drivers/cpufreq/cpufreq.c
>> @@ -675,6 +675,7 @@ static ssize_t store(struct kobject *kobj
>>
>> unlock_policy_rwsem_write(policy->cpu);
>> fail:
>> + msleep(10000);
>> cpufreq_cpu_put_sysfs(policy);
>> no_policy:
>> return ret;
>>
>> and then write scaling_setspeed in one task and offline the cpu
>> in another. The first task will hang and be detected by the hung
>> task detector.
>>
>> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
>> ---
>>
>> Before you ask, I've seen the comment above cpufreq_add_dev() about
>> concurrent hotplug/cpufreq.
>>
>> drivers/cpufreq/cpufreq.c | 35 +++++++++++++++++++++++++++--------
>> 1 file changed, 27 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
>> index 7f2f149..a290771 100644
>> --- a/drivers/cpufreq/cpufreq.c
>> +++ b/drivers/cpufreq/cpufreq.c
>> @@ -138,7 +138,7 @@ void disable_cpufreq(void)
>> static LIST_HEAD(cpufreq_governor_list);
>> static DEFINE_MUTEX(cpufreq_governor_mutex);
>>
>> -struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
>> +static struct cpufreq_policy *__cpufreq_cpu_get(unsigned int cpu, int sysfs)
> I'd prefer the sysfs arg to be a bool.

Sure. V2 coming right up.

--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.



\
 
 \ /
  Last update: 2012-07-20 20:21    [W:0.067 / U:1.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site