From: Stephen Boyd <sboyd@codeaurora.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH] cpufreq: Fix sysfs deadlock with concurrent hotplug/frequency switch
Date: Fri, 20 Jul 2012 10:34:04 -0700 [thread overview]
Message-ID: <5009968C.8030303@codeaurora.org> (raw)
In-Reply-To: <201207201205.36635.rjw@sisk.pl>
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.
next prev parent reply other threads:[~2012-07-20 17:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-20 1:57 [PATCH] cpufreq: Fix sysfs deadlock with concurrent hotplug/frequency switch Stephen Boyd
2012-07-20 10:05 ` Rafael J. Wysocki
2012-07-20 17:34 ` Stephen Boyd [this message]
2012-07-20 18:14 ` [PATCHv2] " Stephen Boyd
2012-07-20 19:51 ` Rafael J. Wysocki
2012-07-21 16:57 ` Shilimkar, Santosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5009968C.8030303@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=cpufreq@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.