From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E197FC433E1 for ; Tue, 4 Aug 2020 06:30:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E8A8F20722 for ; Tue, 4 Aug 2020 06:30:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Sg+mW7y8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726036AbgHDGau (ORCPT ); Tue, 4 Aug 2020 02:30:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725300AbgHDGau (ORCPT ); Tue, 4 Aug 2020 02:30:50 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06975C06174A for ; Mon, 3 Aug 2020 23:30:49 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id a79so3863239pfa.8 for ; Mon, 03 Aug 2020 23:30:49 -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=BS92Sq6q7n94/aHq6JQ3yd1cYmx3gIjRwBJOL6Tqt7s=; b=Sg+mW7y8iDCWNlMIqjCofkFAn8mmYpoI5p05fB1k9dPbzPV3dP967l+i1WPVmM9iJj L4HItDLcwRP7gn3rhzhNEfUeZAFCKCJg0tyMOKEUOeceu0BBKs/7ZalGZOFe7FuNeHeo DLN6Epa2z6pXgYW/HyLtUOpKfLxC1w6PdQ453O7Z70PAkSqKGlxIAjb+b7Bj0Wbuy71k yV5X1a6KGtx2qtB0Og0sbYmbDVFaJVJI+07q7OPCelzrT4OmKwo3TKCdLhJO9EjadUB2 mPmBWTbyLkkuGPlzOhVFNfvDRo6ofK4soaj0bjHN5KFcdPDG4L6Rd2dF/9P3hlWb7kga hr7A== 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=BS92Sq6q7n94/aHq6JQ3yd1cYmx3gIjRwBJOL6Tqt7s=; b=bbL5br2ZWAyKTeb1OfixBHAsV4/WqIodiRRz553+9m+y9OLu4WSDAnQGl07kVrEioZ tr/8M5on0j774QFaFL1zKSh/QAt1dGht/xeVCfTBAphFYJ7IZyKce3uU3FZfDYuSDBOE bRd6FYmV5MiPso9Y+ADj+JF/raN7uwx41FyqbhdjHUIlmhLIetkuODPPFHy9407oTu0/ Iu9BWTAJoZW9kPvcVKXBZ9kWiw/naorL1WNubIG6anemsbg9WvPkVzehi3yV7/LHn/kn Fb39UhUXVylnj1UqJCBOBC02wkv9YUBlkOC9iWkWCSGIUhu2iD3VhdVb5RMk6iXYCIo9 8LzQ== X-Gm-Message-State: AOAM5335Q9E4lnUFxbPDk1i+gyOHzH/gw8kU++B+eGF4r5CRSyhT/kaX 84Nq0ZBtT96DHjUthw5i4cBTZs5IRus= X-Google-Smtp-Source: ABdhPJyGa9ah22zuDQgf0Ditcuq0XQOapNoNRHgrXa/42Bm+te+ZwAEHhvV26wUUZTLHQtWR54mL+Q== X-Received: by 2002:a62:647:: with SMTP id 68mr20097776pfg.45.1596522649293; Mon, 03 Aug 2020 23:30:49 -0700 (PDT) Received: from localhost ([122.162.244.227]) by smtp.gmail.com with ESMTPSA id k21sm17731086pgl.0.2020.08.03.23.30.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Aug 2020 23:30:48 -0700 (PDT) Date: Tue, 4 Aug 2020 12:00:46 +0530 From: Viresh Kumar To: Dietmar Eggemann Cc: Ionela Voinescu , rjw@rjwysocki.net, catalin.marinas@arm.com, sudeep.holla@arm.com, will@kernel.org, linux@armlinux.org.uk, mingo@redhat.com, peterz@infradead.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/7] arch_topology: disable frequency invariance for CONFIG_BL_SWITCHER Message-ID: <20200804063046.a2hw5cxwiewhb3aw@vireshk-mac-ubuntu> References: <20200722093732.14297-1-ionela.voinescu@arm.com> <20200722093732.14297-4-ionela.voinescu@arm.com> <20200730042423.4j22udejluis7blw@vireshk-mac-ubuntu> <1db4317a-0018-1590-f0ae-ed5e235b174f@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1db4317a-0018-1590-f0ae-ed5e235b174f@arm.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30-07-20, 12:29, Dietmar Eggemann wrote: > On 30/07/2020 06:24, Viresh Kumar wrote: > > On 22-07-20, 10:37, Ionela Voinescu wrote: > >> +++ b/drivers/base/arch_topology.c > >> @@ -27,6 +27,7 @@ __weak bool arch_freq_counters_available(struct cpumask *cpus) > >> } > >> DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE; > >> > >> +#ifndef CONFIG_BL_SWITCHER > >> void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq, > >> unsigned long max_freq) > >> { > >> @@ -46,6 +47,7 @@ void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq, > >> for_each_cpu(i, cpus) > >> per_cpu(freq_scale, i) = scale; > >> } > >> +#endif > > > > I don't really like this change, the ifdef hackery is disgusting and > > then we are putting that in a completely different part of the kernel. > > > > There are at least these two ways of solving this, maybe more: > > > > - Fix the bl switcher driver and add the complexity in it (which you > > tried to do earlier). > > > > - Add a cpufreq flag to skip arch-set-freq-scale call. > > I agree it's not nice but IMHO the cpufreq flag is worse since we would > introduce new infrastructure only for a deprecated feature. I'm assuming > that BL SWITCHER is the only feature needing this CPUfreq flag extension. > > #ifdef CONFIG_BL_SWITCHER is already in drivers/irqchip/irq-gic.c so > it's ugly already. > > Runtime detecting (via bL_switching_enabled) of BL SWITCHER is right now > also only handled inside vexpress-spc-cpufreq.c via a > bL_switcher_notifier. A mechanism which also sits behind a #ifdef > CONFIG_BL_SWITCHER. Vexpress one is a driver and so ugliness could be ignored here :) So here is option number 3 (in continuation of the earlier two options): - Don't do anything for bL switcher, just add a TODO/NOTE in the driver that FIE is broken for switcher. And I don't think anyone will care about FIE for the switcher anyway :) -- viresh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41F80C433E0 for ; Tue, 4 Aug 2020 06:32:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 37B6F20722 for ; Tue, 4 Aug 2020 06:32:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lfQ5nf+Q"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Sg+mW7y8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37B6F20722 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=g0SfQgtndsc+e697V1noDpQkO28FlClTL5mw0Xaa5ew=; b=lfQ5nf+QiFowSDckXV46hNbAZ I2tB2as70GgSouOPYMxDEYZXb7W2Wigdvy6rWnAyfXAvDgvmQNkKIWhy3YHt1O8frP6+qCfEjNtKN T8wVS7mc/08Dks9vOXu/Mu8yrAwfFBylkE1WpaQ7RQqZxPvddT9flK8Dixb/BBpBOjEyAOl2+jCA0 FkEuEpA4b+Bvt3jcFnv4PAZpN6Hln12RDqIcBTVE9Inkh2gEXvAanu60awqbsC59w8p5jQAiWSCVb Z8B2/67RLv5W/6Zn2BdTs9HxUA69bCDx4J+Wa2IPgvtMZdlMYV2RHDW5m+zugi4nH1ndF0/bz2WdA u0UxTFRLQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2qTO-00015r-JC; Tue, 04 Aug 2020 06:30:54 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2qTL-00014c-LX for linux-arm-kernel@lists.infradead.org; Tue, 04 Aug 2020 06:30:52 +0000 Received: by mail-pf1-x444.google.com with SMTP id 74so11362937pfx.13 for ; Mon, 03 Aug 2020 23:30:50 -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=BS92Sq6q7n94/aHq6JQ3yd1cYmx3gIjRwBJOL6Tqt7s=; b=Sg+mW7y8iDCWNlMIqjCofkFAn8mmYpoI5p05fB1k9dPbzPV3dP967l+i1WPVmM9iJj L4HItDLcwRP7gn3rhzhNEfUeZAFCKCJg0tyMOKEUOeceu0BBKs/7ZalGZOFe7FuNeHeo DLN6Epa2z6pXgYW/HyLtUOpKfLxC1w6PdQ453O7Z70PAkSqKGlxIAjb+b7Bj0Wbuy71k yV5X1a6KGtx2qtB0Og0sbYmbDVFaJVJI+07q7OPCelzrT4OmKwo3TKCdLhJO9EjadUB2 mPmBWTbyLkkuGPlzOhVFNfvDRo6ofK4soaj0bjHN5KFcdPDG4L6Rd2dF/9P3hlWb7kga hr7A== 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=BS92Sq6q7n94/aHq6JQ3yd1cYmx3gIjRwBJOL6Tqt7s=; b=omD9gLTrAUMAeiMrBOclow7XVbVKNs5D+kypVHee6w2jKkHEkgN8AlVPsK5l3ZOLkh kV+d2ewSl5TaVsbyUE55rqbvcv6FusQY9BsnWoBqH6HVfhHiLiZEQAhXM5zXUaJd/U+G OqElmtDaAhHRFlEf1+rk+fTKUfnAMErBybT62EO1sSD1zzqB0r/E3goPW+ad2W0JB4HB V9JdwzIeRMLOE4xnzicbgt8NuqVoAEsfZLnBnV591XiggMNBHrMYHtwnTM6WcrGAZGY2 4lejnXQkes80qwW5Nz4rhA+WmSKO7Nu18B/5hf7rPsUrL9XkRowv+vyQPKhbKtvNhpvX kwwQ== X-Gm-Message-State: AOAM531MFEPKz6HWCDNX5gJgu790AgC3IH3Ko1Mt/f9WbKcJxz5JUUho f4GPogNr0zRydnIjfhoe8jEMZg== X-Google-Smtp-Source: ABdhPJyGa9ah22zuDQgf0Ditcuq0XQOapNoNRHgrXa/42Bm+te+ZwAEHhvV26wUUZTLHQtWR54mL+Q== X-Received: by 2002:a62:647:: with SMTP id 68mr20097776pfg.45.1596522649293; Mon, 03 Aug 2020 23:30:49 -0700 (PDT) Received: from localhost ([122.162.244.227]) by smtp.gmail.com with ESMTPSA id k21sm17731086pgl.0.2020.08.03.23.30.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Aug 2020 23:30:48 -0700 (PDT) Date: Tue, 4 Aug 2020 12:00:46 +0530 From: Viresh Kumar To: Dietmar Eggemann Subject: Re: [PATCH v2 3/7] arch_topology: disable frequency invariance for CONFIG_BL_SWITCHER Message-ID: <20200804063046.a2hw5cxwiewhb3aw@vireshk-mac-ubuntu> References: <20200722093732.14297-1-ionela.voinescu@arm.com> <20200722093732.14297-4-ionela.voinescu@arm.com> <20200730042423.4j22udejluis7blw@vireshk-mac-ubuntu> <1db4317a-0018-1590-f0ae-ed5e235b174f@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1db4317a-0018-1590-f0ae-ed5e235b174f@arm.com> User-Agent: NeoMutt/20170609 (1.8.3) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200804_023051_750639_594EEE94 X-CRM114-Status: GOOD ( 23.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: catalin.marinas@arm.com, linux-pm@vger.kernel.org, peterz@infradead.org, will@kernel.org, rjw@rjwysocki.net, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, mingo@redhat.com, sudeep.holla@arm.com, Ionela Voinescu , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 30-07-20, 12:29, Dietmar Eggemann wrote: > On 30/07/2020 06:24, Viresh Kumar wrote: > > On 22-07-20, 10:37, Ionela Voinescu wrote: > >> +++ b/drivers/base/arch_topology.c > >> @@ -27,6 +27,7 @@ __weak bool arch_freq_counters_available(struct cpumask *cpus) > >> } > >> DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE; > >> > >> +#ifndef CONFIG_BL_SWITCHER > >> void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq, > >> unsigned long max_freq) > >> { > >> @@ -46,6 +47,7 @@ void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq, > >> for_each_cpu(i, cpus) > >> per_cpu(freq_scale, i) = scale; > >> } > >> +#endif > > > > I don't really like this change, the ifdef hackery is disgusting and > > then we are putting that in a completely different part of the kernel. > > > > There are at least these two ways of solving this, maybe more: > > > > - Fix the bl switcher driver and add the complexity in it (which you > > tried to do earlier). > > > > - Add a cpufreq flag to skip arch-set-freq-scale call. > > I agree it's not nice but IMHO the cpufreq flag is worse since we would > introduce new infrastructure only for a deprecated feature. I'm assuming > that BL SWITCHER is the only feature needing this CPUfreq flag extension. > > #ifdef CONFIG_BL_SWITCHER is already in drivers/irqchip/irq-gic.c so > it's ugly already. > > Runtime detecting (via bL_switching_enabled) of BL SWITCHER is right now > also only handled inside vexpress-spc-cpufreq.c via a > bL_switcher_notifier. A mechanism which also sits behind a #ifdef > CONFIG_BL_SWITCHER. Vexpress one is a driver and so ugliness could be ignored here :) So here is option number 3 (in continuation of the earlier two options): - Don't do anything for bL switcher, just add a TODO/NOTE in the driver that FIE is broken for switcher. And I don't think anyone will care about FIE for the switcher anyway :) -- viresh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel