linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Doug Smythies" <dsmythies@telus.net>
To: "'Rafael J. Wysocki'" <rjw@rjwysocki.net>
Cc: 'Viresh Kumar' <viresh.kumar@linaro.org>,
	'Stratos Karafotis' <stratosk@semaphore.gr>,
	'Andy Tang' <andy.tang@nxp.com>,
	'Linux PM' <linux-pm@vger.kernel.org>
Subject: RE: [PATCH] cpufreq: governor: Ensure sufficiently large sampling intervals
Date: Mon, 18 Dec 2017 08:11:06 -0800	[thread overview]
Message-ID: <000601d3781a$d1354b50$739fe1f0$@net> (raw)
In-Reply-To: Qk2VesPv1C2CsQk2aezkGC

On 2017.12.17 17:16 Rafael J. Wysocki wrote:

> After commit aa7519af450d (cpufreq: Use transition_delay_us for legacy
> governors as well) the sampling_rate field of struct dbs_data may be
> less than the tick period which causes dbs_update() to produce
> incorrect results, so make the code ensure that the value of that
> field will always be sufficiently large.
>
> Fixes: aa7519af450d (cpufreq: Use transition_delay_us for legacy governors as well)
> Reported-by: Andy Tang <andy.tang@nxp.com>
> Reported-by: Doug Smythies <dsmythies@telus.net>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/cpufreq/cpufreq_governor.c |   19 ++++++++++++++++---
> 1 file changed, 16 insertions(+), 3 deletions(-)
>
> Index: linux-pm/drivers/cpufreq/cpufreq_governor.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq_governor.c
> +++ linux-pm/drivers/cpufreq/cpufreq_governor.c
> @@ -22,6 +22,8 @@
> 
> #include "cpufreq_governor.h"
> 
> +#define CPUFREQ_DBS_MIN_SAMPLING_INTERVAL	(2 * TICK_NSEC / NSEC_PER_USEC)
> +

Left over from the other thread on Friday I was testing both the above and
the 1 TICK version:

+#define CPUFREQ_DBS_MIN_SAMPLING_INTERVAL	(TICK_NSEC / NSEC_PER_USEC)

I tested periodic workflows at around 35% average load with work/sleep
frequencies from 100 to 2100 hertz, for both 250 Hertz kernels
(4 millisecond TICK) and 1000 Hertz kernels (1 millisecond TICK)

The 1 TICK version does have a "nosier" response than the 2 TICK version,
but both seem to work fine. Neither are worse than the schedutil response
for the same test.

I'd be O.K. with either the 1 TICK or 2 TICK versions.

... Doug

  parent reply	other threads:[~2017-12-18 16:11 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <HE1PR0402MB282866171A847AE244A9F76CF3340@HE1PR0402MB2828.eurprd04.prod.outlook.com>
2017-12-12  7:30 ` Ask for help on governor Viresh Kumar
2017-12-12 16:18 ` Doug Smythies
2017-12-12 16:51   ` Rafael J. Wysocki
2017-12-13  3:10   ` Doug Smythies
2017-12-13  6:17     ` Viresh Kumar
2017-12-13  6:22       ` Andy Tang
2017-12-13  6:55         ` Viresh Kumar
2017-12-13 16:13       ` Doug Smythies
2017-12-14  1:21       ` Doug Smythies
2017-12-14  2:42         ` Andy Tang
2017-12-14 18:25           ` Stratos Karafotis
2017-12-15  1:29           ` Doug Smythies
2017-12-15  1:30         ` Doug Smythies
2017-12-15  1:56           ` Andy Tang
2017-12-15  7:37           ` Doug Smythies
2017-12-15  9:00             ` Andy Tang
2017-12-15 14:26               ` Rafael J. Wysocki
2017-12-15 15:53             ` Rafael J. Wysocki
2017-12-15 18:27             ` Doug Smythies
2017-12-15 23:53               ` Rafael J. Wysocki
2017-12-18  1:15               ` [PATCH] cpufreq: governor: Ensure sufficiently large sampling intervals Rafael J. Wysocki
2017-12-18  2:59                 ` Andy Tang
2017-12-18  4:38                 ` Viresh Kumar
2017-12-18 16:11               ` Doug Smythies [this message]
2017-12-18 17:42                 ` Rafael J. Wysocki
2017-12-13 16:13     ` Ask for help on governor Doug Smythies
2017-12-13 16:49     ` Doug Smythies
2018-01-29  7:21 [PATCH] cpufreq: governor: Ensure sufficiently large sampling intervals Viresh Kumar
2018-01-31  9:27 ` Rafael J. Wysocki

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='000601d3781a$d1354b50$739fe1f0$@net' \
    --to=dsmythies@telus.net \
    --cc=andy.tang@nxp.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=stratosk@semaphore.gr \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).