lkml.org 
[lkml]   [2016]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 11/19] cpufreq: assert policy->rwsem is held in __cpufreq_governor
On 30-01-16, 12:49, Rafael J. Wysocki wrote:
> On Friday, January 29, 2016 04:33:39 PM Saravana Kannan wrote:
> > AFAIR, the ABBA issue was between the sysfs lock and the policy lock.

Yeah, to be precise here it is:

CPU0 (sysfs read) CPU1 (exit governor)

sysfs-read set_policy()-> lock policy->rwsem
sysfs-active lock Remove sysfs files
lock policy->rwsem sysfs-active lock
Actual read

> > The fix for that issue should not be dropping the lock around
> > POLICY_EXIT.
>
> Right. Dropping the lock is a mistake (which I overlooked, sadly).

I joined the party at around time of 3.10, and we had this problem and
hacky solution then as well. We tried to get rid of it multiple times,
but sadly failed.

> > The proper fix is to have the governor "export" the
> > attributes it wants to add/remove and have the cpufreq framework do
> > the adding/removing of the attributes from sysfs for the governor.

I failed to understand your solution, sorry. Care to explain this a
bit more?

--
viresh

\
 
 \ /
  Last update: 2016-02-01 07:41    [W:0.099 / U:1.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site