From patchwork Sat Oct 17 00:51:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandra Yates X-Patchwork-Id: 7421581 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D4A0F9F37F for ; Sat, 17 Oct 2015 00:49:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 18D4C20610 for ; Sat, 17 Oct 2015 00:49:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 26FCB20609 for ; Sat, 17 Oct 2015 00:49:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751752AbbJQAtM (ORCPT ); Fri, 16 Oct 2015 20:49:12 -0400 Received: from mga14.intel.com ([192.55.52.115]:56884 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751594AbbJQAtM (ORCPT ); Fri, 16 Oct 2015 20:49:12 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 16 Oct 2015 17:49:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,691,1437462000"; d="scan'208";a="828670593" Received: from magt-desktop.jf.intel.com ([10.7.198.102]) by orsmga002.jf.intel.com with ESMTP; 16 Oct 2015 17:49:11 -0700 From: Alexandra Yates To: kristen@linux.intel.com, linux-pm@vger.kernel.org Cc: root Subject: [PATCH] fix intel_pstate to update MSR values when changing governors Date: Fri, 16 Oct 2015 17:51:41 -0700 Message-Id: <1445043101-19079-1-git-send-email-alexandra.yates@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: root 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 --- 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; }