Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1886651pxb; Fri, 5 Feb 2021 04:05:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8z4V0do7kiqlJEeqbEzn6jcC6KzB3wdHeIr76EO7epyKJlrNUISbdvMI675cQi5UI8itf X-Received: by 2002:aa7:d452:: with SMTP id q18mr3231911edr.350.1612526714575; Fri, 05 Feb 2021 04:05:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612526714; cv=none; d=google.com; s=arc-20160816; b=c+miM2o0ey5f6LA9TGt1S9hrPIPeaZJED6BDa4m2YER578y/5Ub4Tgnzb13ZQS7i5D MNcI3mVybOnM2Tzoc54CwjigMWTSJ2vHgSto6VgorT3Zxr2PqudSaciHLnWBeTYdsrJb dKNtK5uXtcR0XuW+owFPOar74vYuKrrBuRa+FQkePUWQpTG/rS3K/37RmlIEY8HzROA2 uH8nKMYOXK/vO/cA5LPCLhIewgvDy8n0yd3m+iBknQRGoh/TWyauPBXtL2b+BIN1ZYc9 DDdm6EQwj3s/3IfokSGI2tP6b7MTUC2crSeHtO5b8XGk7koK8u8hTHtsGDyoTDdVRu8O eFag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=T6X8m6tExz2BAB8hOAwlfjoL5BesmPO9nKskxQcI52o=; b=nDuuSTPFJYCbiOgMsgaXMeuHsRhyalGnWvQuCH/nT6h4EyzvZU9rrGilHHWLKJ6mut NaRF6T9ikpIVOB3HWJdFHthVXJ2hqRlKDpi2y2VXl/H/8qLWt3YZ3j44eWa5ZKHEcI64 tscZr9OxM1GwJKKHIomj7WbD8jGpPP2o4Q3EMA+yhh/8XjSj2g4TkhDJ9GmhUnS1Ie3f zdLrWhA7OzlH3n5pUykh336hu2yU4nVsIxhX3H22EmdNzrOfVMkfpAgVySrx57+Wknue Yh2Nake1sfRzcDWBhmgWjbua9SOAoBRct2YjDX4fgZ/xnJXMup6zwraqPqwq74ACrPV9 QnLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=wzxCL02E; 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 d24si5282038edy.221.2021.02.05.04.04.45; Fri, 05 Feb 2021 04:05:14 -0800 (PST) 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; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=wzxCL02E; 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 S231325AbhBEMBO (ORCPT + 99 others); Fri, 5 Feb 2021 07:01:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232096AbhBEL5P (ORCPT ); Fri, 5 Feb 2021 06:57:15 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F219EC06178B; Fri, 5 Feb 2021 03:56:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=T6X8m6tExz2BAB8hOAwlfjoL5BesmPO9nKskxQcI52o=; b=wzxCL02EEa0zsOWUzhou1nULwc YO23mQuIXkjYvTqvJA5WOkt5x8QzrSHJt9Zn4sjEIbNNIhIydN4q8LFnPcTQ5ufEFTYBfbcsDOc9f YEB7kUwp4sQ+Dj5D7EH6w9oz/EED/+8IowQT1D9uL+8zYfanVT3+86WEtofphXC2Xdd/uhRo359DA CN1NhQyUm7K8BmCSNmskfrDxmsEfOSsm/m8sH1LN4KduC0VUTfLfLAA2ZPl6bYUMw2K/fYCrbPtNF bjC4ePqAwUHVVT5DtD4JU0OMjimiD21TLCOHTfusGnsINSjauBzTvQStF0GCjz8spKXYjDceCm1Y1 21UHRHjg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7zik-0001wh-Uz; Fri, 05 Feb 2021 11:56:19 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 324493013E5; Fri, 5 Feb 2021 12:56:17 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 17FD62BBE1CB2; Fri, 5 Feb 2021 12:56:17 +0100 (CET) Date: Fri, 5 Feb 2021 12:56:17 +0100 From: Peter Zijlstra To: "Rafael J. Wysocki" Cc: Linux PM , LKML , Linux ACPI , Srinivas Pandruvada , Viresh Kumar , Giovanni Gherdovich , Mel Gorman , Michael Larabel , Juri Lelli , Vincent Guittot Subject: Re: [PATCH v1 2/2] cpufreq: ACPI: Update arch scale-invariance max perf ratio if CPPC is not there Message-ID: References: <13690581.X0sz4iL7V8@kreacher> <9510730.kuOQ4KzHjt@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9510730.kuOQ4KzHjt@kreacher> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 04, 2021 at 06:34:32PM +0100, Rafael J. Wysocki wrote: > arch/x86/kernel/smpboot.c | 1 + > drivers/cpufreq/acpi-cpufreq.c | 8 ++++++++ > 2 files changed, 9 insertions(+) > > Index: linux-pm/drivers/cpufreq/acpi-cpufreq.c > =================================================================== > --- linux-pm.orig/drivers/cpufreq/acpi-cpufreq.c > +++ linux-pm/drivers/cpufreq/acpi-cpufreq.c > @@ -806,6 +806,14 @@ static int acpi_cpufreq_cpu_init(struct > state_count++; > valid_states++; > data->first_perf_state = valid_states; > + } else { > + /* > + * If the maximum "boost" frequency is unknown, ask the arch > + * scale-invariance code to use the "nominal" performance for > + * CPU utilization scaling so as to prevent the schedutil > + * governor from selecting inadequate CPU frequencies. > + */ > + arch_set_max_freq_ratio(true); > } > > freq_table = kcalloc(state_count, sizeof(*freq_table), GFP_KERNEL); > Index: linux-pm/arch/x86/kernel/smpboot.c > =================================================================== > --- linux-pm.orig/arch/x86/kernel/smpboot.c > +++ linux-pm/arch/x86/kernel/smpboot.c > @@ -1833,6 +1833,7 @@ void arch_set_max_freq_ratio(bool turbo_ > arch_max_freq_ratio = turbo_disabled ? SCHED_CAPACITY_SCALE : > arch_turbo_freq_ratio; > } > +EXPORT_SYMBOL_GPL(arch_set_max_freq_ratio); Acked-by: Peter Zijlstra (Intel)