Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp329228imm; Wed, 18 Jul 2018 02:56:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfRL1ap16/iAwC22sWBTQbB36DGZ9DCKJsIFqe5AH0bzofMn4267Nq16kAepRI+zBBu+mO3 X-Received: by 2002:a65:6398:: with SMTP id h24-v6mr5118130pgv.245.1531907770042; Wed, 18 Jul 2018 02:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531907770; cv=none; d=google.com; s=arc-20160816; b=fDhzHCK0Iv54ojPtsYTvYTNn7qve3kTGZLVVM632AjSB2SUVagBljpm7CIyhF9Ip4t 7rxgzDK+J0joy9XSNJbxfc7n5ZRTM70WJyEqc/oG126A3OGfGtbtuw7X/Gb8Xwdaz0XR cRfY2SSWS+h3gZuYLXRYgxR6qbrrD+z5uN6RUq31qT27y/mbrAGqZ7Jc3ypqy4/iIsQi uQOMIX9nzQGBQSwYNFiiPiu9Dmw2Jxlcr8S4idlcleCeP99IUK3BjF4t60YxPWWDqNIJ quv/mbZ6Svk9MQHuUwR/FWQ49GTzlTG+oOKL+FgrqovMUtJPGFf8K3OXd30wZMzUqvMJ shwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Pl78QM6FkRaCCyu2rcwxxJska9iDgkvZmssZ/VLQ8Bc=; b=V+6HK6kZzx+3t4OzS5j/2s3weogEKigWiqmr712lqZllKLxxzIUMOEw2p61MbspIeU L4RvI6ePrpCDVlLpyCP/GcbAuEs+aAqYa8keTwJo87Uw1Zm5TxhtVCiHOKZuhKzY+iqM d/QVjR3aTBStqYpluWy+aORASpDHSjouxPBWPFfeSSjnf0HRU/0BD9GuWwj723azOu8u l8ehiYQZaR5aNRpzKJBMhngaVhvg0liXzmB/eUSJBxcbhe3YdojNchDPOaTh5GolwGfe z0Gx8JFnlG17//sLLj3op2hFn6IjDfMu/f1YT00TFIpcTSirDs3dw2Y/sm0ZAsQKmVzo qymw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b16-v6si2785828pgg.342.2018.07.18.02.55.55; Wed, 18 Jul 2018 02:56:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729619AbeGRKcK (ORCPT + 99 others); Wed, 18 Jul 2018 06:32:10 -0400 Received: from smtp.nue.novell.com ([195.135.221.5]:33950 "EHLO smtp.nue.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726064AbeGRKcK (ORCPT ); Wed, 18 Jul 2018 06:32:10 -0400 Received: from emea4-mta.ukb.novell.com ([10.120.13.87]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Wed, 18 Jul 2018 11:35:01 +0200 Received: from suselix (nwb-a10-snat.microfocus.com [10.120.13.202]) by emea4-mta.ukb.novell.com with ESMTP (TLS encrypted); Wed, 18 Jul 2018 10:34:49 +0100 Date: Wed, 18 Jul 2018 11:34:47 +0200 From: Andreas Herrmann To: Peter Zijlstra Cc: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, "Rafael J. Wysocki" , Frederic Weisbecker , Viresh Kumar , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] cpufreq: pcc-cpufreq: Disable dynamic scaling on many-CPU systems Message-ID: <20180718093447.p6iog3bgpyxyj2w5@suselix> References: <20180717065048.74mmgk4t5utjaa6a@suselix> <306375154.NhdH6AhdAd@aspire.rjw.lan> <5423012.ZZnfdYddaT@aspire.rjw.lan> <20180717201323.6rwb4yklq46cmtom@suselix> <20180718082352.GQ2494@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180718082352.GQ2494@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 18, 2018 at 10:23:52AM +0200, Peter Zijlstra wrote: > On Tue, Jul 17, 2018 at 10:13:23PM +0200, Andreas Herrmann wrote: > > On Tue, Jul 17, 2018 at 06:14:58PM +0200, Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > > > The firmware interface used by the pcc-cpufreq driver is > > > fundamentally not scalable and using it for dynamic CPU performance > > > scaling on systems with many CPUs leads to degraded performance. > > > > > > For this reason, disable dynamic CPU performance scaling on systems > > > with pcc-cpufreq where the number of CPUs present at the driver init > > > time is greater than 4. Also make the driver print corresponding > > > complaints to the kernel log. > > > > > > Reported-by: Andreas Herrmann > > > Signed-off-by: Rafael J. Wysocki > > > --- > > > > > > -> v2: Rework the messages printed in the problematic case. > > > > I've tested this patch. Effect is as expected: driver loads but use of > > ondemand governor is not allowed. Sample output: > > > > [ 40.757519] pcc-cpufreq: (v1.10.00) driver loaded with frequency limits: 1200 MHz, 2800 MHz > > [ 40.831705] pcc_cpufreq_init: Too many CPUs, dynamic performance scaling disabled > > [ 40.898353] pcc_cpufreq_init: Try to enable a different scaling driver through BIOS settings > > BTW, Andreas, is that BIOS option available through the normal BIOS > settings, or it is in the "secret" BIOS menu that HP has? If it is in > the "secret" one (^A IIRC) then we might want to explicitly mention > that. The relevant options are not in a secret section (so far I was not even aware of a secret section). But on those systems some stuff is available via iLO interface (browser) and some only via "BIOS/Platform Configuration (RBSU)". The iLO interface has a couple of options that are only visible with an advanced ILO license. The options affecting Linux cpufreq subsystem are (a) available only via "BIOS/Platform Configuration (RBSU)" [Power Management]-> [Advanced Power Options]-> [Collaborative Power Control] == "enabled" | "disabled" If set to "disabled": No cpufreq driver will load and platform is solely responsible for CPU frequency adaptions (whatever that means). (b) available via "BIOS/Platform Configuration (RBSU)" and iLO interface [Power Management]-> [Power Regulator] == "Dynamic Power Savings Mode" | "OS Control Mode" | "Static Low Power Mode" | "Static High Performance Mode" "Dynamic Power Savings Mode" allows pcc-cpufreq to load and "OS Control Mode" allows intel-pstate to be loaded. We now change it such that also with "Dynamic Power Savings Mode" intel-pstate is loaded (if available; if not, pcc-cpufreq will still be loaded but it now emits a warning and disallows use of ondemand governor if too many CPUs are in use). AFAIK the other (static) modes have no real meaning when "Collaborative Power Control" is enabled because as soon as a cpufreq driver is loaded frequency will be adapted by OS. I can't remember which one (pcc-cpufreq or intel-pstate) would be loaded, I've just tried it once or twice. Note that the above is valid for a DL580 Gen8 with Intel CPUs. It might be slightly different on Gen9/Gen10 and/or other models. Ie. for models based on AMD CPUs we just have added a new warning in pcc-cpufreq and disabled use of ondemand governor when the system has more than 4 CPUs. Andreas