All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Stratos Karafotis <stratosk@semaphore.gr>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] cpufreq: conservative: Decrease frequency faster when the update deferred
Date: Mon, 14 Nov 2016 12:34:02 +0530	[thread overview]
Message-ID: <20161114070402.GC4178@vireshk-i7> (raw)
In-Reply-To: <691e286d-249b-e450-2df1-8421d83e6a46@semaphore.gr>

On 12-11-16, 23:04, Stratos Karafotis wrote:
> diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
> index fa5ece3..d787772 100644
> --- a/drivers/cpufreq/cpufreq_conservative.c
> +++ b/drivers/cpufreq/cpufreq_conservative.c
> @@ -73,7 +73,19 @@ static unsigned int cs_dbs_update(struct cpufreq_policy *policy)
>  	 */
>  	if (cs_tuners->freq_step == 0)
>  		goto out;
> -
> +	/*
> +	 * Decrease requested_freq for each idle period that we didn't
> +	 * update the frequency

Add a full stop (.) here.

> +	 */

I am wondering if we should be adding this code after the below 'if' block where
we check if the policy->min/max have changed ?

> +	if (policy_dbs->idle_periods < UINT_MAX) {
> +		unsigned int freq_target = policy_dbs->idle_periods *
> +				get_freq_target(cs_tuners, policy);

I get confused every time I look at this routine (get_freq_target()). I have
sent an update to this file just now to get that fixed. If Rafael applies that
one, please rebase over it.

> +		if (requested_freq > freq_target)
> +			requested_freq -= freq_target;
> +		else
> +			requested_freq = policy->min;
> +		policy_dbs->idle_periods = UINT_MAX;
> +	}

Need a blank line here.

-- 
viresh

  reply	other threads:[~2016-11-14  7:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-12 21:04 [PATCH v2] cpufreq: conservative: Decrease frequency faster when the update deferred Stratos Karafotis
2016-11-14  7:04 ` Viresh Kumar [this message]
2016-11-14 20:44 ` Rafael J. Wysocki
2016-11-14 21:46   ` Stratos Karafotis
2016-11-14 21:59     ` Rafael J. Wysocki
2016-11-14 22:09       ` Rafael J. Wysocki
2016-11-14 22:53         ` Stratos Karafotis

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=20161114070402.GC4178@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=stratosk@semaphore.gr \
    /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.