Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3796507imm; Tue, 17 Jul 2018 10:23:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf5XsddwqGH1DwbmlU4Weib3p0LLGItvpPkLIS6kqgzYXi2+IMpWTn1XE3IR91WK1flSFTI X-Received: by 2002:a17:902:6acc:: with SMTP id i12-v6mr2459747plt.278.1531848231438; Tue, 17 Jul 2018 10:23:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531848231; cv=none; d=google.com; s=arc-20160816; b=SSRPbkTRwm5nf2PkBAvTYSr1zdy6wcBSSr0LR+B/qxm/oCHBv8CxlXKOjPWI3kOF0n 2wP8JgzGKh3II1yvhOcrf4N8P7VVcGXMMRJDPSDwJUvDf1AdPjIi93l2Sd3deV2ptofZ 0yTPQoZH8PaTy4GTY/9ZlNP1RE23BW32os1FMkMPLLnsSGWoZYSfGb7Jej4GZe1RRwKw /JgnQhARsHP1dqXr25O/FktwXSPyakPgFtMYZDo9mRKxkO3EqzsoZP3B3LKK4YXq+r5X vaUOlbrVV5Fg2gFlsUBJQqBAYIlqoGjR7gonLqdgzTqPC7FOFpMs9/lCO3kps/I8GWI0 8j2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=XHEo2E3xwNY7jF9ccXAT3NV6CVURdq7bY4Y3gf8hi6U=; b=X5NiFysV5+Wsc7zBhBll571b66gyzTF1qGFNj08/0cfk0FBK7ZbOpF9cTB2i1J4Bjx c4O3lcRj4XiflH+Issrb5Ix0h7kHcSZyeMPtiBUIj7VLDWJGtTJW+sbwjYjCs4RiEgia bcJzD2VuIEuir41JMGmp1e2Yeh+/gftZ9qqeApOjNnsyRvNtyZVD9fBBbL80De5UT+BP 9QX+Epg6eqcPB/osAR4pmG930ibuvpJ5S2vtx4CE/tPr+hXIkJavdGmolXoKClQzInGY 9LXOkv1u+1JkzpG46nfVCJ3fsPH6x00/GVuKvAoOehTzlc5wU5xHUM6HMZnGmpvkvzhs ccZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65-v6si1303652pld.451.2018.07.17.10.23.36; Tue, 17 Jul 2018 10:23:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730421AbeGQR4k (ORCPT + 99 others); Tue, 17 Jul 2018 13:56:40 -0400 Received: from mga06.intel.com ([134.134.136.31]:28157 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729741AbeGQR4k (ORCPT ); Tue, 17 Jul 2018 13:56:40 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2018 10:23:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,366,1526367600"; d="scan'208";a="72141659" Received: from spandruv-desk.jf.intel.com ([10.54.75.31]) by fmsmga004.fm.intel.com with ESMTP; 17 Jul 2018 10:23:00 -0700 Message-ID: Subject: Re: [PATCH] cpufreq: intel_pstate: Load when ACPI PCCH is present From: Srinivas Pandruvada To: "Rafael J. Wysocki" , Andreas Herrmann Cc: "Rafael J. Wysocki" , Peter Zijlstra , Frederic Weisbecker , Viresh Kumar , Linux PM , Linux Kernel Mailing List Date: Tue, 17 Jul 2018 10:23:00 -0700 In-Reply-To: <8115130.Fhkpr82c7G@aspire.rjw.lan> References: <20180717065048.74mmgk4t5utjaa6a@suselix> <20180717102136.snayvzmv2h3dcwiq@suselix> <20180717140336.ayovaz4ksdlak6bb@suselix> <8115130.Fhkpr82c7G@aspire.rjw.lan> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.2 (3.28.2-1.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-07-17 at 18:13 +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Currently, intel_pstate doesn't load if _PSS is not present on > HP Proliant systems, because it expects the firmware to take over > CPU performance scaling in that case. However, if ACPI PCCH is > present, the firmware expects the kernel to use it for CPU > performance scaling and the pcc-cpufreq driver is loaded for that. > > Unfortunately, the firmware interface used by that driver is not > scalable for fundamental reasons, so pcc-cpufreq is way suboptimal > on systems with more than just a few CPUs. In fact, it is better to > avoid using it at all. > > For this reason, modify intel_pstate to look for ACPI PCCH if _PSS > is not present and load if it is there. > > Fixes: fbbcdc0744da (intel_pstate: skip the driver if ACPI has power > mgmt option) > Reported-by: Andreas Herrmann > Tested-by: Andreas Herrmann > Reviewed-by: Andreas Herrmann > Cc: 4.17+ # 4.17+ > Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada But do we need a change as done by the following commit in in pcc- cpufreq.c? " commit 8a61e12e84597b5f8155ac91b44dea866ccfaac2 Author: Yinghai Lu Date: Fri Sep 20 10:43:56 2013 -0700 acpi-cpufreq: skip loading acpi_cpufreq after intel_pstate " Thanks, Srinivas > --- > drivers/cpufreq/intel_pstate.c | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > Index: linux-pm/drivers/cpufreq/intel_pstate.c > =================================================================== > --- linux-pm.orig/drivers/cpufreq/intel_pstate.c > +++ linux-pm/drivers/cpufreq/intel_pstate.c > @@ -2391,6 +2391,18 @@ static bool __init intel_pstate_no_acpi_ > return true; > } > > +static bool __init intel_pstate_no_acpi_pcch(void) > +{ > + acpi_status status; > + acpi_handle handle; > + > + status = acpi_get_handle(NULL, "\\_SB", &handle); > + if (ACPI_FAILURE(status)) > + return true; > + > + return !acpi_has_method(handle, "PCCH"); > +} > + > static bool __init intel_pstate_has_acpi_ppc(void) > { > int i; > @@ -2450,7 +2462,10 @@ static bool __init intel_pstate_platform > > switch (plat_info[idx].data) { > case PSS: > - return intel_pstate_no_acpi_pss(); > + if (!intel_pstate_no_acpi_pss()) > + return false; > + > + return intel_pstate_no_acpi_pcch(); > case PPC: > return intel_pstate_has_acpi_ppc() && !force_load; > } >