Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5793434pxu; Thu, 22 Oct 2020 11:09:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLwsST+ycyn9rqOPCGFTqJOkWMwYQIOcObgp8yVvb++MoNGf+jMobcU80Zic7U2MPXh28I X-Received: by 2002:a17:906:1682:: with SMTP id s2mr3466918ejd.138.1603390165242; Thu, 22 Oct 2020 11:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603390165; cv=none; d=google.com; s=arc-20160816; b=y15Jw8bFCiYBvKGm8pEi4zsf6vVce1lb7tVqzymHus7OwL6EZbRKwG/3BzZBG/3OSH 2ePmBm/j45ISQOhrKCcUSTvXscXx3xoZ1d+LeKNjPTeMDY2vxTB9S85a2Y86Xxrn1tsB cuIKXSjyBxZbPbKkj7G1gKlqPmTPDFaEbd0DbngCwEa8Muou/S3jmBZ8Vb6aA8Koz0S8 QW5kiFeGwMkr+ZawAlNafajPMkn3AzQFSufLxE9yEo6JQ00H85q0hKz6cFplnvdMypdn gF4veC+Kx+h1QS5AS/A7AqKW+jnjEiMfOE4VKESfTZaNpXyH4/xemb1FYpvUd74VVkzO UIkg== 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=3ynqnsrPl9DggDqvjSDdyizIjZQYQoiUKm6DqdFLA+o=; b=sSUjxShqPDa/tL8cNdMUAbOW/ypHjLCRs+VAMeuV1yfteA2zZ2NPGh/W7Yl/esrrLi 9pJyng7wIesAqh02P2ci7fAE7xc3Ym9z6wq2a5qQ3JYCn6/ItfVkU2/7qQvQllvloUEy Y+jhbkR2dv8lUje5I46o1In7iCCylIh2g2h8ZsZF7Fu2RSEZAnPtun5ilXyCKzU30HZJ yL8NH2u2+GF61Qy0rdnU6dLbkKOE4nfSu84YoKkBTS+VTr1C5eVYTG3ccGxWYXDKruyM zRVUP+fn4DcKGJBBJNtBACiKH+3ZxNAI5DvJ5bpnLl1G/WeA/upxbr7mr9OZvvYBCHwX lFCg== 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 p6si1401293ejb.26.2020.10.22.11.09.03; Thu, 22 Oct 2020 11:09:25 -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 S2901653AbgJVQXH (ORCPT + 99 others); Thu, 22 Oct 2020 12:23:07 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:61512 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2896915AbgJVQXH (ORCPT ); Thu, 22 Oct 2020 12:23:07 -0400 Received: from 89-64-87-167.dynamic.chello.pl (89.64.87.167) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.491) id 6a3182a446ccf5cb; Thu, 22 Oct 2020 18:23:04 +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] cpufreq: Avoid configuring old governors as default with intel_pstate Date: Thu, 22 Oct 2020 18:23:03 +0200 Message-ID: <8312288.dAKoTdFk2S@kreacher> In-Reply-To: <20201022120213.GG2611@hirez.programming.kicks-ass.net> References: <1603211879-1064-1-git-send-email-Julia.Lawall@inria.fr> <34115486.YmRjPRKJaA@kreacher> <20201022120213.GG2611@hirez.programming.kicks-ass.net> 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 Subject: [PATCH] cpufreq: Avoid configuring old governors as default with intel_pstate Commit 33aa46f252c7 ("cpufreq: intel_pstate: Use passive mode by default without HWP") was meant to cause intel_pstate without HWP to be used in the passive mode with the schedutil governor on top of it by default, 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") Cc: 5.8+ # 5.8+ Signed-off-by: Rafael J. Wysocki --- 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 !SMP || !X86_INTEL_PSTATE 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 !SMP || !X86_INTEL_PSTATE select CPU_FREQ_GOV_CONSERVATIVE select CPU_FREQ_GOV_PERFORMANCE help