Linux Power Management development
 help / color / mirror / Atom feed
From: Huaisheng HS1 Ye <yehs1@lenovo.com>
To: "srinivas.pandruvada@linux.intel.com"
	<srinivas.pandruvada@linux.intel.com>
Cc: "lenb@kernel.org" <lenb@kernel.org>,
	"rjw@rjwysocki.net" <rjw@rjwysocki.net>,
	"viresh.kumar@linaro.org" <viresh.kumar@linaro.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Huaisheng HS1 Ye <yehs1@lenovo.com>
Subject: [PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes
Date: Mon, 24 Jul 2017 05:43:14 +0000	[thread overview]
Message-ID: <1500875013-123321-1-git-send-email-yehs1@lenovo.com> (raw)

After commit 82b4e03e01bc (intel_pstate: skip scheduler hook when
in "performance" mode) Software P-state control modes couldn't get
dynamic value during performance mode, and it still in last value from
powersave mode, so clear its value to get same behavior as Hardware
P-state to avoid confusion.

Signed-off-by: Huaisheng Ye <yehs1@lenovo.com>
---
 drivers/cpufreq/intel_pstate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 6cd5035..c675626 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2050,6 +2050,7 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
 		 */
 		intel_pstate_clear_update_util_hook(policy->cpu);
 		intel_pstate_max_within_limits(cpu);
+		cpu->sample.core_avg_perf = 0;
 	} else {
 		intel_pstate_set_update_util_hook(policy->cpu);
 	}
-- 
1.8.3.1

             reply	other threads:[~2017-07-24  5:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24  5:43 Huaisheng HS1 Ye [this message]
2017-07-24 11:36 ` [PATCH] cpufreq: intel_pstate: Fix cpuinfo_cur_freq after performance governor changes Rafael J. Wysocki
2017-07-24 15:32   ` Huaisheng HS1 Ye
2017-07-24 23:51     ` Rafael J. Wysocki
2017-07-25  1:46       ` Huaisheng HS1 Ye
2017-07-25  2:57         ` Srinivas Pandruvada
2017-07-25  7:03           ` Huaisheng HS1 Ye
2017-07-25 14:37             ` Srinivas Pandruvada
2017-07-25 15:22               ` Huaisheng HS1 Ye
2017-07-25 21:46             ` Rafael J. Wysocki
2017-07-25 15:35           ` Rafael J. Wysocki
2017-07-25 22:42             ` [PATCH] cpufreq: intel_pstate: Drop ->get from intel_pstate structure Rafael J. Wysocki
2017-07-27  3:47               ` Viresh Kumar

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=1500875013-123321-1-git-send-email-yehs1@lenovo.com \
    --to=yehs1@lenovo.com \
    --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=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