All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	LKML <linux-kernel@vger.kernel.org>,
	cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
	Namhyung Kim <namhyung.kim@lge.com>
Subject: Re: [PATCH -next 3/3] cpufreq: conservative: Fix relation when decreasing frequency
Date: Thu, 28 Feb 2013 14:59:50 +0900	[thread overview]
Message-ID: <87lia9rnah.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <CAKohpomiG1G2NUScDpzbqTBJAOfNr3PcWe55PoGK8bvY4tCdMw@mail.gmail.com> (Viresh Kumar's message of "Thu, 28 Feb 2013 11:17:03 +0530")

Hi Viresh,

On Thu, 28 Feb 2013 11:17:03 +0530, Viresh Kumar wrote:
> On 28 February 2013 11:08, Namhyung Kim <namhyung@kernel.org> wrote:
>> From: Namhyung Kim <namhyung.kim@lge.com>
>>
>> The relation should be CPUFREQ_RELATION_L to find optimal frequency
>> when decreasing.
>>
>> Cc: Viresh Kumar <viresh.kumar@linaro.org>
>> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
>> ---
>>  drivers/cpufreq/cpufreq_conservative.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
>> index dd2fd9094819..0d582811d66c 100644
>> --- a/drivers/cpufreq/cpufreq_conservative.c
>> +++ b/drivers/cpufreq/cpufreq_conservative.c
>> @@ -106,7 +106,7 @@ static void cs_check_cpu(int cpu, unsigned int load)
>>                         dbs_info->requested_freq = policy->min;
>>
>>                 __cpufreq_driver_target(policy, dbs_info->requested_freq,
>> -                               CPUFREQ_RELATION_H);
>> +                               CPUFREQ_RELATION_L);
>
> Other two patches are fine but really not sure about this one.
> When decreasing freq, what do we want:
> - lowest frequency at or above target, i.e. >= requested_freq
> - highest frequency below or at target, i.e. <= requested_freq
>
> I thought second option was better and so CPUFREQ_RELATION_H
> suits more. What made you do this change?

When decreasing, we were on a higher frequency than target so selecting
above or equal to the target frequency seems to be "conservative".  And
AFAICS the ondemance governor also uses RELATION_L for decreasing.

Thanks,
Namhyung

  reply	other threads:[~2013-02-28  5:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28  5:38 [PATCH -next 1/3] cpufreq: Fix a typo in comment Namhyung Kim
2013-02-28  5:38 ` [PATCH -next 2/3] cpufreq: conservative: Break out earlier on the lowest frequency Namhyung Kim
2013-02-28  5:38 ` [PATCH -next 3/3] cpufreq: conservative: Fix relation when decreasing frequency Namhyung Kim
2013-02-28  5:47   ` Viresh Kumar
2013-02-28  5:59     ` Namhyung Kim [this message]
2013-02-28  6:05       ` Viresh Kumar

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=87lia9rnah.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=rjw@sisk.pl \
    --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.