All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Perret <qperret@google.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: rjw@rjwysocki.net, rafael@kernel.org, arnd@arndb.de,
	mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org,
	mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	kernel-team@android.com, tkjos@google.com,
	adharmap@codeaurora.org
Subject: Re: [PATCH 2/2] cpufreq: Specify default governor on command line
Date: Tue, 16 Jun 2020 10:56:44 +0100	[thread overview]
Message-ID: <20200616095644.GA150003@google.com> (raw)
In-Reply-To: <20200616095438.v7wywhfq5ealvyih@vireshk-i7>

On Tuesday 16 Jun 2020 at 15:24:38 (+0530), Viresh Kumar wrote:
> On 16-06-20, 10:48, Quentin Perret wrote:
> > ---8<---
> > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> > index 0f05caedc320..a9219404e07f 100644
> > --- a/drivers/cpufreq/cpufreq.c
> > +++ b/drivers/cpufreq/cpufreq.c
> > @@ -2340,6 +2340,11 @@ int cpufreq_register_governor(struct cpufreq_governor *governor)
> >  		list_add(&governor->governor_list, &cpufreq_governor_list);
> >  	}
> >  
> > +	if (!strncasecmp(cpufreq_param_governor, governor->name, CPUFREQ_NAME_LEN))
> > +		default_governor = governor;
> > +	else if (!default_governor && cpufreq_default_governor() == governor)
> > +		default_governor = cpufreq_default_governor();
> 
> Instead of the else part here, maybe just do this from
> cpufreq_core_init() only once, and so we will always have
> default_governor set.

Sounds good.

Thanks!
Quentin

WARNING: multiple messages have this Message-ID (diff)
From: Quentin Perret <qperret@google.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: juri.lelli@redhat.com, kernel-team@android.com,
	vincent.guittot@linaro.org, arnd@arndb.de, rafael@kernel.org,
	peterz@infradead.org, adharmap@codeaurora.org,
	linux-pm@vger.kernel.org, rjw@rjwysocki.net,
	linux-kernel@vger.kernel.org, mingo@redhat.com, paulus@samba.org,
	linuxppc-dev@lists.ozlabs.org, tkjos@google.com
Subject: Re: [PATCH 2/2] cpufreq: Specify default governor on command line
Date: Tue, 16 Jun 2020 10:56:44 +0100	[thread overview]
Message-ID: <20200616095644.GA150003@google.com> (raw)
In-Reply-To: <20200616095438.v7wywhfq5ealvyih@vireshk-i7>

On Tuesday 16 Jun 2020 at 15:24:38 (+0530), Viresh Kumar wrote:
> On 16-06-20, 10:48, Quentin Perret wrote:
> > ---8<---
> > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> > index 0f05caedc320..a9219404e07f 100644
> > --- a/drivers/cpufreq/cpufreq.c
> > +++ b/drivers/cpufreq/cpufreq.c
> > @@ -2340,6 +2340,11 @@ int cpufreq_register_governor(struct cpufreq_governor *governor)
> >  		list_add(&governor->governor_list, &cpufreq_governor_list);
> >  	}
> >  
> > +	if (!strncasecmp(cpufreq_param_governor, governor->name, CPUFREQ_NAME_LEN))
> > +		default_governor = governor;
> > +	else if (!default_governor && cpufreq_default_governor() == governor)
> > +		default_governor = cpufreq_default_governor();
> 
> Instead of the else part here, maybe just do this from
> cpufreq_core_init() only once, and so we will always have
> default_governor set.

Sounds good.

Thanks!
Quentin

  reply	other threads:[~2020-06-16  9:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15 16:55 [PATCH 0/2] cpufreq: Specify the default governor on command line Quentin Perret
2020-06-15 16:55 ` Quentin Perret
2020-06-15 16:55 ` [PATCH 1/2] cpufreq: Register governors at core_initcall Quentin Perret
2020-06-15 16:55   ` Quentin Perret
2020-06-16  4:28   ` Viresh Kumar
2020-06-16  4:28     ` Viresh Kumar
2020-06-16  8:31     ` Quentin Perret
2020-06-16  8:31       ` Quentin Perret
2020-06-15 16:55 ` [PATCH 2/2] cpufreq: Specify default governor on command line Quentin Perret
2020-06-15 16:55   ` Quentin Perret
2020-06-15 17:41   ` Quentin Perret
2020-06-15 17:41     ` Quentin Perret
2020-06-16  4:31   ` Viresh Kumar
2020-06-16  4:31     ` Viresh Kumar
2020-06-16  8:31     ` Quentin Perret
2020-06-16  8:31       ` Quentin Perret
2020-06-16  9:27       ` Viresh Kumar
2020-06-16  9:27         ` Viresh Kumar
2020-06-16  9:48         ` Quentin Perret
2020-06-16  9:48           ` Quentin Perret
2020-06-16  9:54           ` Viresh Kumar
2020-06-16  9:54             ` Viresh Kumar
2020-06-16  9:56             ` Quentin Perret [this message]
2020-06-16  9:56               ` Quentin Perret
2020-06-20 14:36   ` [cpufreq] d83f959b5e: aim7.jobs-per-min -30.2% regression kernel test robot
2020-06-20 14:36     ` kernel test robot
2020-06-22  0:54   ` [cpufreq] d83f959b5e: kmsg.cpufreq:cpufreq_online:Failed_to_initialize_policy_for_cpu:#(-#) kernel test robot
2020-06-22  0:54     ` kernel test robot
2020-06-22  0:54     ` kernel test robot
2020-06-23  9:25     ` Quentin Perret
2020-06-23  9:25       ` Quentin Perret
2020-06-23  9:25       ` Quentin Perret

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=20200616095644.GA150003@google.com \
    --to=qperret@google.com \
    --cc=adharmap@codeaurora.org \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=juri.lelli@redhat.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=tkjos@google.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /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.