Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1233980ybt; Thu, 9 Jul 2020 01:56:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4+49hEt06kOh2tNxQkldxGj28CMtLpQK04r7t8HfY6/7OWyyjOumE0+OFWIoeLhWJIw9j X-Received: by 2002:a17:906:c415:: with SMTP id u21mr54715770ejz.45.1594284983536; Thu, 09 Jul 2020 01:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594284983; cv=none; d=google.com; s=arc-20160816; b=WGy8Woay4aMbB2UMvEPOjlwWZkcZXpRj2j2CumiZoL2DirMVsTm3GItWcMpIZ95yXQ 398YtI/u6wG6hEUf55FkqJWZyHv7RALkZYCLXSqW5pwnKHNhTn4m/H9Mdx1dUKz2tMdV Nx9T9s0rsz41NXLVIyWvpC22CKoiTUNzFOtKG9JMtdhZ0obfurSFCQnp6MCdR8Pa6nbn JHViGcVwULooFgN5y2V9qYVmPeNr6ek9ImiGJ9b0MAQzb8JwqRhrPMHhIOJrjWhnVBkW 75Dv/iv3c4NTMy9COeTVfSFbmrI9Fabi/m8dD58WstP0ZuVBkuWue3WJnHrSfy+bJYlk OzKg== 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; bh=D3Lv89sEp4ifEkFkjXoAnyl1wKsjML5hvtrm5IRGO+E=; b=Cffn57uRw2vbY+Vgy/Qo0aO7ZWubdz/SaXF9LJFtBY00GCz/R2UiJecE1zO/h8+GLb 7zGxCzJ1C0UYGAsKYb5esTxwe3VOii4IT97SV7bff2z1W6/oE4Et2H+jvBKm6VZywR4P 202zmCq7X5FfnPYCh/nA3bdtkBG7D6eUc2jU1tNOzwl+6soa0uZ45EdxrmLNGaJjpdZc QleflX9MKv1OZ2AqH2EBTTc1w7gf6B7aAscabiiEOt/yjmOowCNTU+RTaZwwhIv7GGA/ m059I5RtUiB5SP/Q5oWbrP8DgcC7atFopj2lsWmJXuKUIEOMXqf7kFCT+NEAun20mYae uipA== 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 k8si1510725ejc.257.2020.07.09.01.56.00; Thu, 09 Jul 2020 01:56:23 -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 S1726347AbgGIIx6 (ORCPT + 99 others); Thu, 9 Jul 2020 04:53:58 -0400 Received: from foss.arm.com ([217.140.110.172]:44016 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726122AbgGIIx5 (ORCPT ); Thu, 9 Jul 2020 04:53:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9D48331B; Thu, 9 Jul 2020 01:53:56 -0700 (PDT) Received: from localhost (unknown [10.1.198.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 397383F887; Thu, 9 Jul 2020 01:53:56 -0700 (PDT) Date: Thu, 9 Jul 2020 09:53:54 +0100 From: Ionela Voinescu To: Dietmar Eggemann Cc: Viresh Kumar , "Rafael J. Wysocki" , "Rafael J. Wysocki" , Catalin Marinas , Sudeep Holla , Will Deacon , Russell King - ARM Linux , Valentin Schneider , Ingo Molnar , Peter Zijlstra , Linux PM , Linux ARM , Linux Kernel Mailing List Subject: Re: [PATCH 1/8] cpufreq: allow drivers to flag custom support for freq invariance Message-ID: <20200709085354.GA5623@arm.com> References: <20200701090751.7543-1-ionela.voinescu@arm.com> <20200701090751.7543-2-ionela.voinescu@arm.com> <20200701094417.ffuvduz6pqknjcks@vireshk-i7> <20200701133330.GA32736@arm.com> <20200702025818.s4oh7rzz3tr6zwqr@vireshk-i7> <20200702114425.GB28120@arm.com> <389dd87f-fed0-e4ea-81f3-5491fd2a54d1@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <389dd87f-fed0-e4ea-81f3-5491fd2a54d1@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi guys, On Monday 06 Jul 2020 at 14:14:47 (+0200), Dietmar Eggemann wrote: > On 02/07/2020 13:44, Ionela Voinescu wrote: > > Hi, > > > > On Thursday 02 Jul 2020 at 08:28:18 (+0530), Viresh Kumar wrote: > >> On 01-07-20, 18:05, Rafael J. Wysocki wrote: > >>> On Wed, Jul 1, 2020 at 3:33 PM Ionela Voinescu wrote: > >>>> On Wednesday 01 Jul 2020 at 16:16:17 (+0530), Viresh Kumar wrote: > > [...] > > >> There can be other reasons which we aren't able to imagine at this > >> point of time. > >> > > > > But I understand both the points you and Rafael raised so it's obvious > > that a 'opt in' flag would be the better option. > > Why can't we just move the arch_set_freq_scale() call from cpufreq > driver to cpufreq core w/o introducing a FIE related driver flag? > > Current scenario for Frequency Invariance Engine (FIE) on arm/arm64. > > +------------------------------+ +------------------------------+ > | | | | > | cpufreq core: | | arch: (arm, arm64) | > > | | | | > | weak arch_set_freq_scale() {}| | | > | | | | > +------------------------------+ | | > | | > +------------------------------+ | | > | | | | > | cpufreq driver: | | | > | +-----------> arch_set_freq_scale() | > | | | { | > +------------------------------+ | if (use counters) | > | return; | > +------------------------------+ | ... | > | | | } | > | task scheduler: | | | > | +-----------> arch_scale_freq_tick()* | > | | | { | > > | | | if (!use counters) | > | | | return; | > | | | ... | > | | | } | > +------------------------------+ +------------------------------+ > > * defined as topology_scale_freq_tick() in arm64 > > Only Arm/Arm64 defines arch_set_freq_scale() to get the 'legacy' CPUfreq > based FIE. This would still be the case when we move > arch_set_freq_scale() from individual cpufreq drivers to cpufreq core. > > Arm64 is the only arch which has to runtime-choose between two different > FIEs. This is currently done by bailing out early in one of the FIE > functions based on 'use counters'. > > X86 (and others) will continue to not define arch_set_freq_scale(). > > The issue with CONFIG_BL_SWITCHER (vexpress-spc-cpufreq.c) could be > solved arm/arm64 internally (arch_topology.c) by putting > arch_set_freq_scale() under a !CONFIG_BL_SWITCHER guard. > I doubt that there are any arm bL systems out there running it. At least > I'm not aware of any complaints due to missing FIE support in bl > switcher setups so far. Thank you Dietmar, for your review. I was trying to suggest the same in my other replies. Given that BL_SWITCHER can be removed as an argument for introducing a flag, I would also find it cleaner to just skip on introducing a flag altogether, at least until we have a driver/scenario in the kernel that will functionally benefit from it. This would also give us the chance to reconsider the best meaning of the flag we later introduce. The introduction of the 'opt in' flag would be the next best thing as suggested in the other replies, but currently it would not result in anything functionally different. Rafael, Viresh, would you mind confirming whether you still consider having an 'opt in' flag is preferable here? Many thanks, Ionela.