All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix intel_pstate to update MSR values when changing governors
       [not found] <fix intel_pstate to update MSR values when changing governors>
@ 2015-10-17  0:51 ` Alexandra Yates
  2015-10-17  1:15   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandra Yates @ 2015-10-17  0:51 UTC (permalink / raw)
  To: kristen, linux-pm; +Cc: root

From: root <root@skl-s-fedora22.jf.intel.com>

When changing from powersave to performance governors
Intel_pstate fails to update the MSR values that reflect the
max_perf_pct to 100%. For instance:

Governor 	MSR	max_perf_pct
=========	====	============
Powersave 	2828	100%
Powersave	2028	80%
Performance	2028	100% <-

The arrow shows the culprit. At this point the  MSR should
reflect the max_perf_pct that is 100% that corresponds MSR 2828
the maximum performance for the Performance governor.
Instead it holds back the MSR value previously set
by the Powersave governor 2028.

Signed-off-by: root <root@skl-s-fedora22.jf.intel.com>
---
 drivers/cpufreq/intel_pstate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index cde38c8..992dbb5 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1239,6 +1239,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
 	    policy->max >= policy->cpuinfo.max_freq) {
 		pr_debug("intel_pstate: set performance\n");
 		limits = &performance_limits;
+		if (hwp_active)
+			intel_pstate_hwp_set();
 		return 0;
 	}
 
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix intel_pstate to update MSR values when changing governors
  2015-10-17  0:51 ` [PATCH] fix intel_pstate to update MSR values when changing governors Alexandra Yates
@ 2015-10-17  1:15   ` Rafael J. Wysocki
  2015-11-18  1:45     ` Alexandra Yates
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2015-10-17  1:15 UTC (permalink / raw)
  To: Alexandra Yates; +Cc: kristen, linux-pm@vger.kernel.org, root

Hi,

On Sat, Oct 17, 2015 at 2:51 AM, Alexandra Yates
<alexandra.yates@linux.intel.com> wrote:
> From: root <root@skl-s-fedora22.jf.intel.com>
>
> When changing from powersave to performance governors
> Intel_pstate fails to update the MSR values that reflect the
> max_perf_pct to 100%. For instance:
>
> Governor        MSR     max_perf_pct
> =========       ====    ============
> Powersave       2828    100%
> Powersave       2028    80%
> Performance     2028    100% <-
>
> The arrow shows the culprit. At this point the  MSR should
> reflect the max_perf_pct that is 100% that corresponds MSR 2828
> the maximum performance for the Performance governor.
> Instead it holds back the MSR value previously set
> by the Powersave governor 2028.
>
> Signed-off-by: root <root@skl-s-fedora22.jf.intel.com>

It looks like you need to update your git configuration.

More to the point, I wonder if this commit addresses the problem your seeing:

http://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=51443fbf3d2cde16011b994252c8004ebcd66fb0

> ---
>  drivers/cpufreq/intel_pstate.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index cde38c8..992dbb5 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -1239,6 +1239,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
>             policy->max >= policy->cpuinfo.max_freq) {
>                 pr_debug("intel_pstate: set performance\n");
>                 limits = &performance_limits;
> +               if (hwp_active)
> +                       intel_pstate_hwp_set();
>                 return 0;
>         }
>
> --

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix intel_pstate to update MSR values when changing governors
  2015-10-17  1:15   ` Rafael J. Wysocki
@ 2015-11-18  1:45     ` Alexandra Yates
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandra Yates @ 2015-11-18  1:45 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: kristen, linux-pm@vger.kernel.org, root

On 10/16/2015 06:15 PM, Rafael J. Wysocki wrote:
> Hi,
>
> On Sat, Oct 17, 2015 at 2:51 AM, Alexandra Yates
> <alexandra.yates@linux.intel.com> wrote:
>> From: root <root@skl-s-fedora22.jf.intel.com>
>>
>> When changing from powersave to performance governors
>> Intel_pstate fails to update the MSR values that reflect the
>> max_perf_pct to 100%. For instance:
>>
>> Governor        MSR     max_perf_pct
>> =========       ====    ============
>> Powersave       2828    100%
>> Powersave       2028    80%
>> Performance     2028    100% <-
>>
>> The arrow shows the culprit. At this point the  MSR should
>> reflect the max_perf_pct that is 100% that corresponds MSR 2828
>> the maximum performance for the Performance governor.
>> Instead it holds back the MSR value previously set
>> by the Powersave governor 2028.
>>
>> Signed-off-by: root <root@skl-s-fedora22.jf.intel.com>
>
Sorry about this I sent the patch against an internal tree.
Won't happen again.

> It looks like you need to update your git configuration.
>
> More to the point, I wonder if this commit addresses the problem your seeing:
>

I tested only with the following patch in question and it doesn't fix 
the error for the MSR values on SKL.  I'm resending my patch rebased to 
linux-pm, including a better explanation on what the error is and what 
is fixing.

> http://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=51443fbf3d2cde16011b994252c8004ebcd66fb0
>
>> ---
>>   drivers/cpufreq/intel_pstate.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
>> index cde38c8..992dbb5 100644
>> --- a/drivers/cpufreq/intel_pstate.c
>> +++ b/drivers/cpufreq/intel_pstate.c
>> @@ -1239,6 +1239,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
>>              policy->max >= policy->cpuinfo.max_freq) {
>>                  pr_debug("intel_pstate: set performance\n");
>>                  limits = &performance_limits;
>> +               if (hwp_active)
>> +                       intel_pstate_hwp_set();
>>                  return 0;
>>          }
>>
>> --
>
> Thanks,
> Rafael
>

-- 
Thank you,
<Alexandra>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-18  1:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <fix intel_pstate to update MSR values when changing governors>
2015-10-17  0:51 ` [PATCH] fix intel_pstate to update MSR values when changing governors Alexandra Yates
2015-10-17  1:15   ` Rafael J. Wysocki
2015-11-18  1:45     ` Alexandra Yates

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.