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


Groups > linux.kernel > #1674000

[PATCH 4/4] intel_pstate: skip scheduler hook when in "performance" mode.

Path csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From Len Brown <lenb@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 4/4] intel_pstate: skip scheduler hook when in "performance" mode.
Date Sat, 24 Jun 2017 07:20:01 +0200
Message-ID <tVLEd-3Fl-1@gated-at.bofh.it> (permalink)
References <tVLEd-3Fl-3@gated-at.bofh.it>
X-Original-To rafael@kernel.org, tglx@linutronix.de
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references:reply-to:organization; bh=vS/65CXVUvBJYzrWCFm3nmFzXQ2j7benFTPYJ0loJZA=; b=Om2o2khPCgQcrcwcN6qtNiwYTbBLusLsNR/UxYV3ZIaRJ3ivbDeaR5r0iueFRD/jjt Dg5NUgdcf2HKN8TYzP8DbNkKOQsQVhroPX9DVZQPy/iOQ+i1bafivUKd3E6Jt/oKCsAH EIWtSkXMY7Lwt/FHlSivRlhUcEoMhhSQnDLxGbBSNdsWUoL4EwvKOS+iIOlYlxDn1phF 1UUVQaxx6mM6bre1Max7cSgVhOA/NGsbIjncY+YNkogfP4MTVhj9VLDX1B+E+EeO/RMk 5ROHu2MZGvWq9SmNQY/4DtxuTnDAUHiuVG/MJeAaE9+11tI+fgEaSfIjymWsJzg0iJe2 oF1Q==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references:reply-to:organization; bh=vS/65CXVUvBJYzrWCFm3nmFzXQ2j7benFTPYJ0loJZA=; b=Xbg69Vh+tsPpdygqyJSzx2h/KuX/TXi5rX89LU8976JEgfg3JV5J2zxaxq4sCP0NAd ysI9xdpjm80Wu1vdt63gLhrNkzGe/l947/FjUEsOOi9mmig7C59zY9LiwqhPjLUZC5Ob Tp2QAIE8o/tNi2sMmjEe/9E6BH6P2TK30W6xgJvE41xcbv8oAk9HpKi35TQc5qgJNVQF kF0No/EhjkdtSU4SIrJCol5WYn3fCRRaapf1ZPD1BtMHIrzEvKVG6B4K+yIPC3SYhgxh 5bmaJFyA1vfcM3tmBCp6z02uw1iOH11I4mij0fadIKEK5JIC97dJVeUXPtsaNdRPBVV7 BttQ==
X-Gm-Message-State AKS2vOwpeE2Ev9Imz6Wf04BW4EaKEfay12i4TsIyhVSdSrqjmKdh7wkK EbbEKfiQodBie0Bt
X-Received by 10.237.36.143 with SMTP id t15mr5288563qtc.180.1498281123659; Fri, 23 Jun 2017 22:12:03 -0700 (PDT)
X-Mailer git-send-email 2.7.4
Reply-To Len Brown <lenb@kernel.org>
Organization Intel Open Source Technology Center
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 39
X-Original-Cc x86@kernel.org, srinivas.pandruvada@linux.intel.com, peterz@infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Len Brown <len.brown@intel.com>
X-Original-Date Fri, 23 Jun 2017 22:11:54 -0700
X-Original-Message-ID <68516d288d3968fe22d6c8984a7bcbdcdbed351d.1498280509.git.len.brown@intel.com>
X-Original-References <1498281114-3868-1-git-send-email-lenb@kernel.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1674000

Show key headers only | View raw


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.

The cpufreq/scaling_cur_freq sysfs attribute is now provided by
shared x86 cpufreq code on 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 4ec5668..4538182 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2031,10 +2031,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

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


Thread

[PATCH 4/4] intel_pstate: skip scheduler hook when in "performance" mode. Len Brown <lenb@kernel.org> - 2017-06-24 07:20 +0200

csiph-web