Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1241875

Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct on governor switch

From Prarit Bhargava <prarit@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct on governor switch
Date 2015-10-08 02:20 +0200
Message-ID <qh769-3Sm-7@gated-at.bofh.it> (permalink)
References <qgIhs-1Li-7@gated-at.bofh.it> <qh26t-4Xj-7@gated-at.bofh.it> <qh4Bj-eo-3@gated-at.bofh.it> <qh4Bj-eo-1@gated-at.bofh.it> <qh5nI-1oq-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 10/07/2015 06:26 PM, Doug Smythies wrote:
> On 2015.10.07 15:06 Rafael J. Wysocki wrote:
>> On Wednesday, October 07, 2015 05:31:25 PM Prarit Bhargava wrote:
>>> On 10/07/2015 02:52 PM, Doug Smythies wrote:
>>>> On 2015.10.07 08:46 Prarit Bhargava wrote:
>>>>> On 10/07/2015 11:40 AM, Doug Smythies wrote:
>>>>>>
>>>>>> Do we agree or disagree that the root issue seems to be (from your test)?:
>>>>>>
>>>>>> \#  echo 100 > /sys/devices/system/cpu/intel_pstate/min_perf_pct
>>>>>>
>>>>>> [   21.483436] store_min_perf_pct[453] min_sysfs_pct = 100
>>>>>> [   21.489373] store_min_perf_pct[456] min_perf_pct = 100
>>>>>> [   21.495203] store_min_perf_pct[459] min_perf_pct = 100
>>>>>> [   21.501050] store_min_perf_pct[462] min_perf_pct = 100
>>>>>
>>>>> Yep, and it appears to be done by default in Fedora & RHEL :/ ... the issue is
>>>>> still the same IMO that min_sysfs_pct & max_sysfs_pct are not cleared on a
>>>>> governor switch.
>>>>
>>>> Clearing them will break some other things. For example, and as
>>>> shown in my original reply, resume from suspend.
>>>>
>>>> Why? Because, at least on my computer, the governor is changed to
>>>> "performance" during suspend, and the "powersave" governor is
>>>> restored sometime during resume. The users wants the settings they had
>>>> before the suspend.
>>>>
>>> Looking at this in more detail after having tested on a Intel(R) Core(TM)
>>> i7-2600 CPU @ 3.40GHz in Fedora and RHEL.
>>>
>>> I have a feeling that the switch you're seeing (poweersave->performance, suspend
>>> ... resume, performance->powersave) is occurring in userspace, and not as a
>>> result of the kernel.
> Agreed. It is pm-suspend doing it.
> 
>>>  IMO if userspace changes the governor, all bets are off
>>> on maintaining max_sysfs_pct and min_sysfs_pct.
>>>
>>> Here's something I cannot figure out (because I do not have an Ubuntu install).
>>>  *Why* is Ubuntu making the governor switch during suspend/resume?  Is it
>>> because of archaic brokeness they were trying to paper over?
> 
>>> That's not limited to Ubuntu, pm-utils has been doing that forever.
> 
> Agreed. This in pm-utils, and not limited to Ubuntu.
> We can ignore this issue if everyone wants, but I can envision bug reports.
> 
>> I have no idea why has it been doing that, though.  I guess the reason
>> was to "speed up" PM transitions (in case it started when you were in a
>> low-frequency P-state and then there was no time to bump it up before
>> things got too far).
> 
> I have no idea either, but the stated theory seems sound.

Doug, can you also apply (sorry for the cut-and-paste)

diff --git a/pm/sleep.d/94cpufreq b/pm/sleep.d/94cpufreq
index 6807681..2c83e8e 100755
--- a/pm/sleep.d/94cpufreq
+++ b/pm/sleep.d/94cpufreq
@@ -16,6 +16,8 @@ hibernate_cpufreq()
                gov="$x/cpufreq/scaling_governor"
                # if we do not have a scaling_governor file, skip.
                [ -f "$gov" ] || continue
+               # Is the governor known to work?
+               [ "$gov" == "intel_pstate" ] && continue
                # if our temporary governor is not available, skip.
                grep -q "$TEMPORARY_CPUFREQ_GOVERNOR" \
                        "$x/cpufreq/scaling_available_governors" || continue

and re-test?

Thanks,

P.
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-06 23:50 +0200
  Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct on governor switch "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-07 00:30 +0200
    Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct on governor switch "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-07 00:40 +0200
      RE: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct on governor switch "Doug Smythies" <dsmythies@telus.net> - 2015-10-07 09:00 +0200
        Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct  on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-07 12:10 +0200
          RE: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct on governor switch "Doug Smythies" <dsmythies@telus.net> - 2015-10-07 16:10 +0200
            Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct  on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-07 16:20 +0200
              RE: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct on governor switch "Doug Smythies" <dsmythies@telus.net> - 2015-10-07 17:50 +0200
                Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct  on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-07 17:50 +0200
                RE: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct on governor switch "Doug Smythies" <dsmythies@telus.net> - 2015-10-07 21:00 +0200
                Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct  on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-07 22:50 +0200
                Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct on governor switch "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-07 23:40 +0200
                RE: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct on governor switch "Doug Smythies" <dsmythies@telus.net> - 2015-10-08 00:30 +0200
                Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct  on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-08 01:20 +0200
                Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct  on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-08 02:20 +0200
                Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct  on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-08 01:10 +0200
                Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct  on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-07 23:40 +0200
            RE: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-07 16:40 +0200
      Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct  on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-07 13:40 +0200
      Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct  on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-07 14:20 +0200
        Re: [PATCH] cpufreq, intel_pstate, set max_sysfs_pct and min_sysfs_pct  on governor switch Prarit Bhargava <prarit@redhat.com> - 2015-10-07 17:00 +0200

csiph-web