Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Rafael J. Wysocki
On Fri, Feb 5, 2016 at 4:24 AM, Viresh Kumar wrote: > On 05-02-16, 04:17, Rafael J. Wysocki wrote: >> And don't we switch governors under policy->rwsem anyway? > > So ? That is blocking only a single policy only, but with the new > change, we will block all policies from doing that concurrently.

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Viresh Kumar
On 05-02-16, 04:17, Rafael J. Wysocki wrote: > And don't we switch governors under policy->rwsem anyway? So ? That is blocking only a single policy only, but with the new change, we will block all policies from doing that concurrently. -- viresh

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Viresh Kumar
On 05-02-16, 04:06, Rafael J. Wysocki wrote: > And why is this a big problem, actually? Why do we want the switching > of governors to be that efficient? I am not saying its a big problem, just that its kind of a big lock, which could have been finer. -- viresh

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Rafael J. Wysocki
On Fri, Feb 5, 2016 at 4:15 AM, Rafael J. Wysocki wrote: > On Fri, Feb 5, 2016 at 4:06 AM, Rafael J. Wysocki wrote: >> On Fri, Feb 5, 2016 at 3:59 AM, Viresh Kumar wrote: >>> On 04-02-16, 17:46, Rafael J. Wysocki wrote: On Thu, Feb 4, 2016 at 6:09 AM, Viresh Kumar wrote: > On

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Rafael J. Wysocki
On Fri, Feb 5, 2016 at 4:06 AM, Rafael J. Wysocki wrote: > On Fri, Feb 5, 2016 at 3:59 AM, Viresh Kumar wrote: >> On 04-02-16, 17:46, Rafael J. Wysocki wrote: >>> On Thu, Feb 4, 2016 at 6:09 AM, Viresh Kumar >>> wrote: >>> > On 04-02-16, 00:16, Rafael J. Wysocki wrote: >>> >> From: Rafael J.

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Rafael J. Wysocki
On Fri, Feb 5, 2016 at 3:59 AM, Viresh Kumar wrote: > On 04-02-16, 17:46, Rafael J. Wysocki wrote: >> On Thu, Feb 4, 2016 at 6:09 AM, Viresh Kumar wrote: >> > On 04-02-16, 00:16, Rafael J. Wysocki wrote: >> >> From: Rafael J. Wysocki >> >> >> >> Every governor relying on the common code in

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Viresh Kumar
On 04-02-16, 17:46, Rafael J. Wysocki wrote: > On Thu, Feb 4, 2016 at 6:09 AM, Viresh Kumar wrote: > > On 04-02-16, 00:16, Rafael J. Wysocki wrote: > >> From: Rafael J. Wysocki > >> > >> Every governor relying on the common code in cpufreq_governor.c > >> has to provide its own mutex in struct

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Rafael J. Wysocki
On Thu, Feb 4, 2016 at 6:09 AM, Viresh Kumar wrote: > On 04-02-16, 00:16, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki >> >> Every governor relying on the common code in cpufreq_governor.c >> has to provide its own mutex in struct common_dbs_data. However, >> those mutexes are never used

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Rafael J. Wysocki
On Fri, Feb 5, 2016 at 4:15 AM, Rafael J. Wysocki wrote: > On Fri, Feb 5, 2016 at 4:06 AM, Rafael J. Wysocki wrote: >> On Fri, Feb 5, 2016 at 3:59 AM, Viresh Kumar wrote: >>> On 04-02-16, 17:46, Rafael J. Wysocki wrote: On Thu,

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Rafael J. Wysocki
On Fri, Feb 5, 2016 at 3:59 AM, Viresh Kumar wrote: > On 04-02-16, 17:46, Rafael J. Wysocki wrote: >> On Thu, Feb 4, 2016 at 6:09 AM, Viresh Kumar wrote: >> > On 04-02-16, 00:16, Rafael J. Wysocki wrote: >> >> From: Rafael J. Wysocki

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Rafael J. Wysocki
On Fri, Feb 5, 2016 at 4:06 AM, Rafael J. Wysocki wrote: > On Fri, Feb 5, 2016 at 3:59 AM, Viresh Kumar wrote: >> On 04-02-16, 17:46, Rafael J. Wysocki wrote: >>> On Thu, Feb 4, 2016 at 6:09 AM, Viresh Kumar >>> wrote: >>> >

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Viresh Kumar
On 04-02-16, 17:46, Rafael J. Wysocki wrote: > On Thu, Feb 4, 2016 at 6:09 AM, Viresh Kumar wrote: > > On 04-02-16, 00:16, Rafael J. Wysocki wrote: > >> From: Rafael J. Wysocki > >> > >> Every governor relying on the common code in

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Viresh Kumar
On 05-02-16, 04:17, Rafael J. Wysocki wrote: > And don't we switch governors under policy->rwsem anyway? So ? That is blocking only a single policy only, but with the new change, we will block all policies from doing that concurrently. -- viresh

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Viresh Kumar
On 05-02-16, 04:06, Rafael J. Wysocki wrote: > And why is this a big problem, actually? Why do we want the switching > of governors to be that efficient? I am not saying its a big problem, just that its kind of a big lock, which could have been finer. -- viresh

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Rafael J. Wysocki
On Fri, Feb 5, 2016 at 4:24 AM, Viresh Kumar wrote: > On 05-02-16, 04:17, Rafael J. Wysocki wrote: >> And don't we switch governors under policy->rwsem anyway? > > So ? That is blocking only a single policy only, but with the new > change, we will block all policies from

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-04 Thread Rafael J. Wysocki
On Thu, Feb 4, 2016 at 6:09 AM, Viresh Kumar wrote: > On 04-02-16, 00:16, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki >> >> Every governor relying on the common code in cpufreq_governor.c >> has to provide its own mutex in struct

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-03 Thread Viresh Kumar
On 04-02-16, 00:16, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Every governor relying on the common code in cpufreq_governor.c > has to provide its own mutex in struct common_dbs_data. However, > those mutexes are never used at the same time Why do you think so? I thought they can

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-03 Thread Saravana Kannan
On 02/03/2016 03:16 PM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki Every governor relying on the common code in cpufreq_governor.c has to provide its own mutex in struct common_dbs_data. However, those mutexes are never used at the same time and doing it this way makes it rather

[PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-03 Thread Rafael J. Wysocki
From: Rafael J. Wysocki Every governor relying on the common code in cpufreq_governor.c has to provide its own mutex in struct common_dbs_data. However, those mutexes are never used at the same time and doing it this way makes it rather difficult to follow the code. Moreover, if two governor

[PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-03 Thread Rafael J. Wysocki
From: Rafael J. Wysocki Every governor relying on the common code in cpufreq_governor.c has to provide its own mutex in struct common_dbs_data. However, those mutexes are never used at the same time and doing it this way makes it rather difficult to follow the code.

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-03 Thread Saravana Kannan
On 02/03/2016 03:16 PM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki Every governor relying on the common code in cpufreq_governor.c has to provide its own mutex in struct common_dbs_data. However, those mutexes are never used at the same time and doing it this

Re: [PATCH 2/11] cpufreq: governor: Use common mutex for dbs_data protection

2016-02-03 Thread Viresh Kumar
On 04-02-16, 00:16, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Every governor relying on the common code in cpufreq_governor.c > has to provide its own mutex in struct common_dbs_data. However, > those mutexes are never used at the same time Why do you