Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-26 Thread Quentin Perret
On Friday 26 Jun 2020 at 08:23:46 (+0530), Viresh Kumar wrote: > On 23-06-20, 15:21, Quentin Perret wrote: > > @@ -2789,7 +2796,13 @@ static int __init cpufreq_core_init(void) > > cpufreq_global_kobject = kobject_create_and_add("cpufreq", > > &cpu_subsys.dev_root->kobj); > > BUG_ON(!cpufre

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-25 Thread Viresh Kumar
On 23-06-20, 15:21, Quentin Perret wrote: > @@ -2789,7 +2796,13 @@ static int __init cpufreq_core_init(void) > cpufreq_global_kobject = kobject_create_and_add("cpufreq", > &cpu_subsys.dev_root->kobj); > BUG_ON(!cpufreq_global_kobject); > > + mutex_lock(&cpufreq_governor_mutex); >

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-25 Thread Rafael J. Wysocki
On Thu, Jun 25, 2020 at 3:50 PM Quentin Perret wrote: > > On Thursday 25 Jun 2020 at 15:28:43 (+0200), Rafael J. Wysocki wrote: > > On Thu, Jun 25, 2020 at 1:53 PM Quentin Perret wrote: > > > > > > On Thursday 25 Jun 2020 at 13:44:34 (+0200), Rafael J. Wysocki wrote: > > > > On Thu, Jun 25, 2020

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-25 Thread Quentin Perret
On Thursday 25 Jun 2020 at 15:28:43 (+0200), Rafael J. Wysocki wrote: > On Thu, Jun 25, 2020 at 1:53 PM Quentin Perret wrote: > > > > On Thursday 25 Jun 2020 at 13:44:34 (+0200), Rafael J. Wysocki wrote: > > > On Thu, Jun 25, 2020 at 1:36 PM Viresh Kumar > > > wrote: > > > > This change is not r

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-25 Thread Rafael J. Wysocki
On Thu, Jun 25, 2020 at 1:53 PM Quentin Perret wrote: > > On Thursday 25 Jun 2020 at 13:44:34 (+0200), Rafael J. Wysocki wrote: > > On Thu, Jun 25, 2020 at 1:36 PM Viresh Kumar > > wrote: > > > This change is not right IMO. This part handles the set-policy case, > > > where there are no governor

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-25 Thread Quentin Perret
On Thursday 25 Jun 2020 at 13:44:34 (+0200), Rafael J. Wysocki wrote: > On Thu, Jun 25, 2020 at 1:36 PM Viresh Kumar wrote: > > This change is not right IMO. This part handles the set-policy case, > > where there are no governors. Right now this code, for some reasons > > unknown to me, forcefully

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-25 Thread Rafael J. Wysocki
On Thu, Jun 25, 2020 at 1:36 PM Viresh Kumar wrote: > > After your last email (reply to my patch), I noticed a change which > isn't required. :) > > On 23-06-20, 15:21, Quentin Perret wrote: > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > > index 0128de3603df..4b1a5c0173cf

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-25 Thread Viresh Kumar
After your last email (reply to my patch), I noticed a change which isn't required. :) On 23-06-20, 15:21, Quentin Perret wrote: > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index 0128de3603df..4b1a5c0173cf 100644 > --- a/drivers/cpufreq/cpufreq.c > +++ b/drivers/cpufreq/

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-25 Thread Rafael J. Wysocki
On Thu, Jun 25, 2020 at 10:50 AM Viresh Kumar wrote: > > On 24-06-20, 16:32, Quentin Perret wrote: > > Right, but I must admit that, looking at this more, I'm getting a bit > > confused with the overall locking for governors :/ > > > > When in cpufreq_init_policy() we find a governor using > > fin

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-25 Thread Viresh Kumar
On 24-06-20, 16:32, Quentin Perret wrote: > Right, but I must admit that, looking at this more, I'm getting a bit > confused with the overall locking for governors :/ > > When in cpufreq_init_policy() we find a governor using > find_governor(policy->last_governor), what guarantees this governor is

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-24 Thread Quentin Perret
On Wednesday 24 Jun 2020 at 14:51:04 (+0200), Rafael J. Wysocki wrote: > On Wed, Jun 24, 2020 at 7:50 AM Viresh Kumar wrote: > > > @@ -2789,7 +2796,13 @@ static int __init cpufreq_core_init(void) > > > cpufreq_global_kobject = kobject_create_and_add("cpufreq", > > > &cpu_subsys.dev_root->ko

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-24 Thread Rafael J. Wysocki
On Wed, Jun 24, 2020 at 7:50 AM Viresh Kumar wrote: > > On 23-06-20, 15:21, Quentin Perret wrote: > > Currently, the only way to specify the default CPUfreq governor is via > > Kconfig options, which suits users who can build the kernel themselves > > perfectly. > > > > However, for those who use

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-23 Thread Viresh Kumar
On 23-06-20, 15:21, Quentin Perret wrote: > Currently, the only way to specify the default CPUfreq governor is via > Kconfig options, which suits users who can build the kernel themselves > perfectly. > > However, for those who use a distro-like kernel (such as Android, with > the Generic Kernel I

[PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-23 Thread Quentin Perret
Currently, the only way to specify the default CPUfreq governor is via Kconfig options, which suits users who can build the kernel themselves perfectly. However, for those who use a distro-like kernel (such as Android, with the Generic Kernel Image project), the only way to use a different default