Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1244257ybt; Thu, 9 Jul 2020 02:12:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVAGQ/GrybnTw9+0BCo9GAIwH0uZEIhhzdzktGgcPcp9VFNDDpwuGz8kJ0WPZBLEHc3bYf X-Received: by 2002:a17:906:35d2:: with SMTP id p18mr58167898ejb.393.1594285945805; Thu, 09 Jul 2020 02:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594285945; cv=none; d=google.com; s=arc-20160816; b=iPEOoG87+aPjvMoVzgdye6cI7cpfpDPVfoAgLbdJ8nK+S/lTaQVhRenv4zauKwiT2I ZtCFoANo/YL41VFYzT3g+Q2iMlbSTskGEerkRPzXh3UfY2mLQrMeAgPPDav2wIzjkRE7 ajVp4PYU2v01ll1QEKhkXBZfZ8KEklQE7ZsG+G1wT/F/SNIi3fAXdTF/JybSQ8KpL6gP eMkQQ73vgzU/4/fIV+GFjRtlGi1ndZjb9WrMA3kh8tp7V8mcFcDEV2Q9JrvDC9njMrlU naPX999lGblWOyeWeoUu3virLFKbpS4d14bqBJpQi+92ELdqFgUa6lGcNEQhKxBIJXWb 2qRg== 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:dkim-signature; bh=dfRkitREAl1cCOBzHtF2sXnD7um5XaadlgUl3USHzOw=; b=xa2jwm+ic+h/mWoJ1cFa39fuem42CqK/PZpvaSI1C9YEMFmDGiN3UD89V6pdglhpjK /kwx9mg4GEifyUCJGiCeNZY9d9PIdO+7QLEuTOYo/vKvYE/fS4aVnt5iiEGOWf7kY+sz Q7l7/vWPqA7OMfVKiY8lN0UakY9SXPL7do2jz0EskpxX0SnX8tf30zzw9mSP99q7Re2y A/GKLD92pYFh1MuT6Ah2l1O5TOXv7/x0hlYRzZz3MaaaBJqtx5Qmcae/P9s6imtPdQMj zPdtWQ1WMEoZZoL/SQhWvzdM3ye5gExeXI71xZKKNEm3MuuT3TJYw9UMOhztxk4Uhi3Z hRdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vRZqKThI; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si1513761ejr.298.2020.07.09.02.12.02; Thu, 09 Jul 2020 02:12: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; dkim=pass header.i=@linaro.org header.s=google header.b=vRZqKThI; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726332AbgGIJJS (ORCPT + 99 others); Thu, 9 Jul 2020 05:09:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbgGIJJQ (ORCPT ); Thu, 9 Jul 2020 05:09:16 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A592C061A0B for ; Thu, 9 Jul 2020 02:09:16 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id f16so834657pjt.0 for ; Thu, 09 Jul 2020 02:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dfRkitREAl1cCOBzHtF2sXnD7um5XaadlgUl3USHzOw=; b=vRZqKThIDXkF1WZVYjCd+lAU6Yw2xjVCcYtJIao696XqXbwd91uA7uJ5g1mR35cCFB rZr5VYDRmnjk9boh6Jl5KyqMTPrY2H0G8FIPX9kZMMCJPuMs+cBqkQKxNe1W3lYR78eH FaDvwzxnmHT5f6eztfFL7bkqinHccld+C1fydY+Qf2Rf7XdsUzJs1yIBEsg04ZFanFWe CFTvMh7apsM6QnpAVOUY5cjzNo85yhDwcicI+HX+8QaqeD9tHp0W2Rw4UnVEHSDGHPIR LEpTCKYLqF5yE0phZTENtyuOY4JTQ61JAFBPpDquOfQkBPwEsUM6VfBzbZKzL88cLkdf uAlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=dfRkitREAl1cCOBzHtF2sXnD7um5XaadlgUl3USHzOw=; b=ZmTsgvTVKuC73JCgsRR4Al8wLizMrEgkTDBxyGLlViYzgvTJF9bE52YVAKUd0hLy80 c5q7J/qiIcs7Y/YA2AEB14abYDlXqBA/mYXMyPCgW547WiuadIsXefAAZmRxkwtFMmvc chMAl3bQBOSSo3JmbXR2LA/D3X7yBG0ABfUCtmvxnBqLDavBSMH/lPnh60SQu4tvHA9Y /B1wCe/yYlg3U5xP+wF0DHzG7YS4rHUnJv6KH5KwLnHAe3Th9Dj4Id0hqFDmF1uUktY4 dfrybN0MUP11sDnDvqxNejhdtAGdbplckSmUSLU12H0YwJ12nExW48mElhQ3No1Yq0K7 GBeQ== X-Gm-Message-State: AOAM531M1kRoebOpzdKEgSxoOxn/ytVjLMGJgG9g4r2xX9RdQTtGL+vH N9CCV1kABYBBT44bcltrL5ROvw== X-Received: by 2002:a17:90a:b00e:: with SMTP id x14mr14377506pjq.57.1594285755440; Thu, 09 Jul 2020 02:09:15 -0700 (PDT) Received: from localhost ([122.172.40.201]) by smtp.gmail.com with ESMTPSA id u19sm2364195pfk.98.2020.07.09.02.09.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2020 02:09:14 -0700 (PDT) Date: Thu, 9 Jul 2020 14:39:12 +0530 From: Viresh Kumar To: Ionela Voinescu Cc: Dietmar Eggemann , "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: <20200709090912.vapouiruidgypxzc@vireshk-i7> 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> <20200709085354.GA5623@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200709085354.GA5623@arm.com> User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09-07-20, 09:53, Ionela Voinescu wrote: > On Monday 06 Jul 2020 at 14:14:47 (+0200), Dietmar Eggemann wrote: > > 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. I agree to that. > Thank you Dietmar, for your review. > > I was trying to suggest the same in my other replies. I am sorry, I must have overlooked that part in your replies, otherwise I may agreed to it :) > Rafael, Viresh, would you mind confirming whether you still consider > having an 'opt in' flag is preferable here? Well, we wanted an opt-in flag instead of an opt-out one. And no flag is certainly better. -- viresh