linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Doug Smythies" <dsmythies@telus.net>
To: "'Viresh Kumar'" <viresh.kumar@linaro.org>
Cc: <linux-pm@vger.kernel.org>,
	"'Vincent Guittot'" <vincent.guittot@linaro.org>,
	<linux-kernel@vger.kernel.org>,
	"'Rafael Wysocki'" <rjw@rjwysocki.net>,
	"'Srinivas Pandruvada'" <srinivas.pandruvada@linux.intel.com>,
	"'Len Brown'" <lenb@kernel.org>
Subject: RE: [PATCH V4 2/2] cpufreq: intel_pstate: Implement QoS supported freq constraints
Date: Thu, 8 Aug 2019 23:35:25 -0700	[thread overview]
Message-ID: <001f01d54e7c$a22395d0$e66ac170$@net> (raw)
In-Reply-To: <20190809021607.j4qj3jm72gbisvqh@vireshk-i7>

On 2019.08.08 19:16 Viresh Kumar wrote:
> On 08-08-19, 09:25, Doug Smythies wrote:
>> On 2019.08.07 00:06 Viresh Kumar wrote:
>> Tested by: Doug Smythies <dsmythies@telus.net>
>> Thermald seems to now be working O.K. for all the governors.
>
> Thanks for testing Doug.
> 
>> I do note that if one sets
>> /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq
>> It seems to override subsequent attempts via
>> /sys/devices/system/cpu/intel_pstate/max_perf_pct.
>> Myself, I find this confusing.
>> 
>> So the question becomes which one is the "master"?
>
> No one is master, cpufreq takes all the requests for frequency
> constraints and tries to set the value based on aggregation of all. So
> for max frequency, the lowest value wins and is shown up in sysfs.
>
> So, everything looks okay to me.

O.K. While I understand the explanations, I still struggle with
this scenario:
 
doug@s15:~/temp$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
50    <<< Note: 50% = 1.9 GHz in my system)
doug@s15:~/temp$ grep . /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:1900000
/sys/devices/system/cpu/cpufreq/policy1/scaling_max_freq:1900000
/sys/devices/system/cpu/cpufreq/policy2/scaling_max_freq:1900000
/sys/devices/system/cpu/cpufreq/policy3/scaling_max_freq:1900000
/sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq:1900000
/sys/devices/system/cpu/cpufreq/policy5/scaling_max_freq:1900000
/sys/devices/system/cpu/cpufreq/policy6/scaling_max_freq:1900000
/sys/devices/system/cpu/cpufreq/policy7/scaling_max_freq:1900000

At this point I am not certain what I'll get if I try to
set max_perf_pct to 100%, nor do I know how to find out
with a user command.

So, I'll try it:

doug@s15:~/temp$ echo 100 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct
100
doug@s15:~/temp$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
100  <<< Note: 100% = 3.8 GHz in my system)
doug@s15:~/temp$ grep . /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:2200000
/sys/devices/system/cpu/cpufreq/policy1/scaling_max_freq:2200000
/sys/devices/system/cpu/cpufreq/policy2/scaling_max_freq:2200000
/sys/devices/system/cpu/cpufreq/policy3/scaling_max_freq:2200000
/sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq:2200000
/sys/devices/system/cpu/cpufreq/policy5/scaling_max_freq:2200000
/sys/devices/system/cpu/cpufreq/policy6/scaling_max_freq:2200000
/sys/devices/system/cpu/cpufreq/policy7/scaling_max_freq:2200000

I guess I had set it sometime earlier, forgot, and then didn't
get 3.8 Ghz as I had expected via max_perf_pct.

... Doug



  reply	other threads:[~2019-08-09  6:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07  7:06 [PATCH V4 1/2] cpufreq: schedutil: Don't skip freq update when limits change Viresh Kumar
2019-08-07  7:06 ` [PATCH V4 2/2] cpufreq: intel_pstate: Implement QoS supported freq constraints Viresh Kumar
2019-08-08 16:25   ` Doug Smythies
2019-08-08 16:46     ` Rafael J. Wysocki
2019-08-09  2:16     ` Viresh Kumar
2019-08-09  6:35       ` Doug Smythies [this message]
2019-08-09  6:51         ` Viresh Kumar
2019-08-09  2:22   ` [PATCH V5 " Viresh Kumar
2019-08-09  5:48     ` Doug Smythies
2019-08-26  9:18     ` 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='001f01d54e7c$a22395d0$e66ac170$@net' \
    --to=dsmythies@telus.net \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=srinivas.pandruvada@linux.intel.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 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).