mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: x86@kernel.org, srinivas.pandruvada@linux.intel.com,
	hpa@linux.intel.com, peterz@infradead.org, rafael@kernel.org
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Len Brown <len.brown@intel.com>
Subject: [PATCH 4/5] intel_pstate: skip scheduler hook when in "performance" mode.
Date: Wed,  7 Jun 2017 19:39:15 -0700	[thread overview]
Message-ID: <1ecfadf4193fbd8873d4bcda9e9faec5825bcafb.1496889051.git.len.brown@intel.com> (raw)
In-Reply-To: <1496889556-17923-1-git-send-email-lenb@kernel.org>
In-Reply-To: <f9250362b5eb66bc34402c1fd175f9db7a841532.1496889051.git.len.brown@intel.com>

From: Len Brown <len.brown@intel.com>

When the governor is set to "performance", intel_pstate does not
need the scheduler hook for doing any calculations.  Under these
conditions, its only purpose is to continue to maintain
cpufreq/scaling_cur_freq.

But the cpufreq/scaling_cur_freq sysfs attribute is now provided by
the x86 cpufreq core on all modern x86 systems, including
all systems supported by the intel_pstate driver.

So in "performance" governor mode, the scheduler hook can be skipped.
This applies to both in Software and Hardware P-state control modes.

Suggested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/cpufreq/intel_pstate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 5d67780..0ff3a4b 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2025,10 +2025,10 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
 		 */
 		intel_pstate_clear_update_util_hook(policy->cpu);
 		intel_pstate_max_within_limits(cpu);
+	} else {
+		intel_pstate_set_update_util_hook(policy->cpu);
 	}
 
-	intel_pstate_set_update_util_hook(policy->cpu);
-
 	if (hwp_active)
 		intel_pstate_hwp_set(policy->cpu);
 
-- 
2.7.4

  parent reply	other threads:[~2017-06-08  2:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08  2:39 [PATCH 0/5] x86, cpufreq: consolidate APERF/MPERF calculation Len Brown
2017-06-08  2:39 ` [PATCH 1/5] x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz" Len Brown
2017-06-08  2:39   ` [PATCH 2/5] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF Len Brown
2017-06-17  0:30     ` Rafael J. Wysocki
2017-06-17  1:49       ` Len Brown
2017-06-19 12:28         ` Rafael J. Wysocki
2017-06-19 14:18           ` Rafael J. Wysocki
2017-06-08  2:39   ` [PATCH 3/5] intel_pstate: remove intel_pstate.get() Len Brown
2017-06-16 23:53     ` Rafael J. Wysocki
2017-06-17  0:35       ` Len Brown
2017-06-17  0:37         ` Rafael J. Wysocki
2017-06-17  1:10           ` Len Brown
2017-06-17  1:21             ` Rafael J. Wysocki
2017-06-17  1:40               ` Rafael J. Wysocki
2017-06-17  2:06                 ` Len Brown
2017-06-17  0:22     ` Rafael J. Wysocki
2017-06-08  2:39   ` Len Brown [this message]
2017-06-17  0:04     ` [PATCH 4/5] intel_pstate: skip scheduler hook when in "performance" mode Rafael J. Wysocki
2017-06-17  0:52       ` Len Brown
2017-06-17  1:06         ` Rafael J. Wysocki
2017-06-17  1:31           ` Len Brown
2017-06-17  1:35             ` Len Brown
2017-06-08  2:39   ` [PATCH 5/5] intel_pstate: delete scheduler hook in HWP mode Len Brown
2017-06-17  0:09     ` Rafael J. Wysocki
2017-06-17  1:27       ` Len Brown

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=1ecfadf4193fbd8873d4bcda9e9faec5825bcafb.1496889051.git.len.brown@intel.com \
    --to=lenb@kernel.org \
    --cc=hpa@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®