Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp599204pxu; Fri, 23 Oct 2020 08:42:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNRJevyQJ6NkVbGOGMBjZAg+vuKu48olTEWmwLpomEvi1XmN9u0gl7ULBJjbZcaOyu/Nkh X-Received: by 2002:a17:906:804:: with SMTP id e4mr2641045ejd.379.1603467753476; Fri, 23 Oct 2020 08:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603467753; cv=none; d=google.com; s=arc-20160816; b=P5xATDL5nc3SccWXMB9e+ju/hIUgRYhvo91XHaeYNTR8v6Dc9J4vritK9HzViRIq9D ZPfkJY/AUj9NHTjN4D+CIYEBHuMs0e6FDlhJtab+TD9B0V1XooGwrNnZHc5An8Da16gk KmBA/2329O8zl3NPYOEkLNT2LgLr9U0hC5rTCBl7kxzZGbY9gYAffm69z1fpXRv/2QAp NvvyRSV3c4Qmu/trMWUG5IZxYAfxq8OHWnpOS9b5tuUzEgqXINY9uWyWJJaS+vjkZ71X iSwUsLdPRUTaZjlOgyC81dnftd6Upa0XUsVsWpoPXWm53qYBgf6kW2F04LhFarICyX/n tTxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=VVsEq+wRbGQg5Ha262jtQgKJ2V9xu+fwLoD8r3aBHAg=; b=ILtQ71f1x32n+5IKdbuGZU7TCgWq8nUutfMfRpipLpUJ0TVc5rlMft4vE4fkuL8R0m wPXJb9p/YzjG386mSJHzhH2PZUAMPweK9MA9UXoVWqTrbURqu7zbUYCqf+6Hp1d3ce2E bNePNgOAcXvjcvh8R35AWPxV/xO9mu8KJOzKh54A8v8iE1bMKrCpwemWhMXjwy+b0J/v G/nvAmyiLqOHQ4W97Z72v6fHbuhUUbViNiNIFl0nTxAyse1ROAWor3E0920ldB9bucMG MqZgy8est5psNzcPo8ukQnjio/f6vg7DYe+HGkbSZ6CGIQLbE/jWh83VsXCzoAGf8Ckd m3Fw== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h8si1314749ejj.258.2020.10.23.08.42.09; Fri, 23 Oct 2020 08:42:33 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S463362AbgJWL77 (ORCPT + 99 others); Fri, 23 Oct 2020 07:59:59 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:33714 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S369960AbgJWL77 (ORCPT ); Fri, 23 Oct 2020 07:59:59 -0400 Received: by mail-ot1-f67.google.com with SMTP id t15so1071012otk.0; Fri, 23 Oct 2020 04:59:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VVsEq+wRbGQg5Ha262jtQgKJ2V9xu+fwLoD8r3aBHAg=; b=X9BdsVdCspr4xaYTx6E3dGaxWFHAZZH6HQw+c4QR9azkCuyURku2iyguwgEXpz9um4 W4/W52ZI6YEnE3/I8Ix+L+ItgES6tT1L5o32WyPmD6nZOtTAwy40bu/XhAs7rbf5PdUw ryAyPqEZIYs5/I+h23dfVff4ThnJIKI4bH/h4mfM8TuEIPmVMR1xprvL0o554CtV+i0r ybdYHH2DBHYTzjPnbYxZz0yHTx0as5xaf6jMZ81TLgbdvJizaSNLxptHuhApZyP2Zh5g rMQZRoxaeMhPP2NKfDk7bLpcQoqc9msvm+ebGj0PX9eacyG3xJ1z6KKAhUTiERK0MQ+d OiRg== X-Gm-Message-State: AOAM533HiiUwpxLa+VGOZrPrpCa32mbR08Rl6L6YvTuIuWyiZ3ZTb2Pr AjgWKGQ5Hr+MLL3X3z9rWGryM0I9jwlDgEQ8gQk= X-Received: by 2002:a9d:ac9:: with SMTP id 67mr1320247otq.321.1603454397748; Fri, 23 Oct 2020 04:59:57 -0700 (PDT) MIME-Version: 1.0 References: <1603211879-1064-1-git-send-email-Julia.Lawall@inria.fr> <34115486.YmRjPRKJaA@kreacher> <20201022120213.GG2611@hirez.programming.kicks-ass.net> <8312288.dAKoTdFk2S@kreacher> <20201023061703.jjpmoeq7wzwqtsid@vireshk-i7> In-Reply-To: <20201023061703.jjpmoeq7wzwqtsid@vireshk-i7> From: "Rafael J. Wysocki" Date: Fri, 23 Oct 2020 13:59:45 +0200 Message-ID: Subject: Re: [PATCH] cpufreq: Avoid configuring old governors as default with intel_pstate To: Viresh Kumar Cc: "Rafael J. Wysocki" , Peter Zijlstra , Julia Lawall , 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 Mailing List , Valentin Schneider , Gilles Muller , Srinivas Pandruvada , Linux PM , Len Brown Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 23, 2020 at 8:17 AM Viresh Kumar wrote: > > On 22-10-20, 18:23, Rafael J. Wysocki wrote: > > 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 > > While reading this first it felt like a SMP platforms related problem > (which I was surprised about), and then I understood what you are > doing. > > I wonder if rewriting it this way makes it more readable with same > result eventually. > > depends on !(X86_INTEL_PSTATE && SMP) Agreed, will update. Thanks!