Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp641088pxu; Fri, 23 Oct 2020 09:35:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFPvqe5M/PuRSztOCGvwKGtt/wMQiK47Outq/v6UkogiZxlGTMa/Zmq7TRrbU5JDEU1fON X-Received: by 2002:a17:906:bc98:: with SMTP id lv24mr2751553ejb.545.1603470947710; Fri, 23 Oct 2020 09:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603470947; cv=none; d=google.com; s=arc-20160816; b=viTpdoYqqFRazA1O4wtCmE63U9Smk28wGS1l24vgnQt1E7ZiKX6xfutQ1hyXHbBcSW Zxp2EV7NV6qLByFTl860H4EZhJ7eqA1R0atJrxk0yGfykVV7bm4b2PoYdAOpMjIvaFeh MCsBlDTDGDcnjXR8G8At9m0V5CZZTW9wW7g5mJAvFspGgoFUJfuT5vkc5GRkV0RH8d90 g8v1Ni78SqL0WcXy7cZFlAvW8g/cpPQvOCeoaJV4cqCdrYECbWFoHJBoPgF+CB15BKt/ wyMWn55UPiEC/+t3EaA4IzmOR2+34GPKOj9hqrGebyWrR64i0DHD1Vb+sI6vv5WnXcz9 +TEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=jadL54C/OXlXdG68hghii3oWeL3AWquYRgf2KTOQHeY=; b=JiBYigl4O/9Yxxh9C33vAUPiG/KZsl1l0t2RVLfUvwJStTNcG/417e7RNRG1FkxGMN i+iHO/AZ94o8AKq8ESW5+y8JHg0OHE4KdgpDMXb5wYjbp0HCJ3uunzFE8aBcsnqQwMpD gc/M45DbQT7XaEW0xo3b1PEMB4Q01tOaQus/8B+ijRAv/T59iCWdVL0nMJGNwoCHeLWD narziyaWXbu7JqCPUOj/jQKM/9PezBZJRYaunHtAhutz4tNuuYIVS1LnzLszoxClyije vvfpH8B8qzpiyqtKNs7feWpPQ212nFtBF1S6hNfXJ7gi8rU0KYMJoePJ+NTKfrb8+aG2 63lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si1253513ejz.457.2020.10.23.09.35.25; Fri, 23 Oct 2020 09:35:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S465676AbgJWPQA (ORCPT + 99 others); Fri, 23 Oct 2020 11:16:00 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:46646 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S461811AbgJWPP7 (ORCPT ); Fri, 23 Oct 2020 11:15:59 -0400 Received: from 89-64-88-190.dynamic.chello.pl (89.64.88.190) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.491) id a4d8527cdf27f5d6; Fri, 23 Oct 2020 17:15:57 +0200 From: "Rafael J. Wysocki" To: Peter Zijlstra , Viresh Kumar , Julia Lawall Cc: Mel Gorman , Ingo Molnar , kernel-janitors@vger.kernel.org, Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org, Valentin Schneider , Gilles Muller , srinivas.pandruvada@linux.intel.com, Linux PM , Len Brown Subject: [PATCH v2] cpufreq: Avoid configuring old governors as default with intel_pstate Date: Fri, 23 Oct 2020 17:15:56 +0200 Message-ID: <9382251.a2nkXps1mP@kreacher> In-Reply-To: <8312288.dAKoTdFk2S@kreacher> References: <1603211879-1064-1-git-send-email-Julia.Lawall@inria.fr> <20201022120213.GG2611@hirez.programming.kicks-ass.net> <8312288.dAKoTdFk2S@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki Commit 33aa46f252c7 ("cpufreq: intel_pstate: Use passive mode by default without HWP") was meant to cause intel_pstate to be used in the passive mode with the schedutil governor on top of it, but it missed the case in which either "ondemand" or "conservative" was selected as the default governor in the existing kernel config, in which case the previous old governor configuration would be used, causing the default legacy governor to be used on top of intel_pstate instead of schedutil. Address this by preventing "ondemand" and "conservative" from being configured as the default cpufreq governor in the case when schedutil is the default choice for the default governor setting. [Note that the default cpufreq governor can still be set via the kernel command line if need be and that choice is not limited, so if anyone really wants to use one of the legacy governors by default, it can be achieved this way.] Fixes: 33aa46f252c7 ("cpufreq: intel_pstate: Use passive mode by default without HWP") Reported-by: Julia Lawall Cc: 5.8+ # 5.8+ Signed-off-by: Rafael J. Wysocki --- The v2 addresses a review comment from Viresh regarding of the expression format and adds a missing Reported-by for Julia. --- drivers/cpufreq/Kconfig | 2 ++ 1 file changed, 2 insertions(+) Index: linux-pm/drivers/cpufreq/Kconfig =================================================================== --- linux-pm.orig/drivers/cpufreq/Kconfig +++ linux-pm/drivers/cpufreq/Kconfig @@ -71,6 +71,7 @@ config CPU_FREQ_DEFAULT_GOV_USERSPACE config CPU_FREQ_DEFAULT_GOV_ONDEMAND bool "ondemand" + depends on !(X86_INTEL_PSTATE && SMP) select CPU_FREQ_GOV_ONDEMAND select CPU_FREQ_GOV_PERFORMANCE help @@ -83,6 +84,7 @@ config CPU_FREQ_DEFAULT_GOV_ONDEMAND config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE bool "conservative" + depends on !(X86_INTEL_PSTATE && SMP) select CPU_FREQ_GOV_CONSERVATIVE select CPU_FREQ_GOV_PERFORMANCE help