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,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 6C194C433E0 for ; Mon, 10 Aug 2020 09:02:46 +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 2C854206B5 for ; Mon, 10 Aug 2020 09:02:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="I9ZSaIz9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C854206B5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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=Tys1UlnVztU7cw3iKKX3WlfI3uTwohMPomIJosp/Zh8=; b=I9ZSaIz9j2IM0wXRj5miEjlkH Vphowd2CJvLiKvNZOFJjTdMnH8NC4sTzhBANb/KJExMDj7F/AMIUXHaj0HlPXi5BKVaADquaPDGlH 98pMC2P2zRDC7W2SxSUv8KFb4/myfhMP9j0u1xD89FI+fhOx+WeJrmYXjSVxKoz0hTZjAuzMG/UQu 42SNjUbSa9xqzA0hkdb8ebjiU2YutKZJo6o0PRsjWo9nr9Sh6qUvdFvi2RXAtZvmBcFPJ7rBr1BmY hprC2cUMZfFr2yOje+VWZTyc7jIz7zlulHma4hDpEUT3tsiurwhJ59murU6VllNqMSUNpDJzblCbn fdoni2pJA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k53g6-0006vZ-Tc; Mon, 10 Aug 2020 09:01:11 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k53g4-0006uy-7T for linux-arm-kernel@lists.infradead.org; Mon, 10 Aug 2020 09:01:09 +0000 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 992BF101E; Mon, 10 Aug 2020 02:01:02 -0700 (PDT) Received: from localhost (unknown [10.1.198.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3A2BB3F7BB; Mon, 10 Aug 2020 02:01:02 -0700 (PDT) Date: Mon, 10 Aug 2020 10:01:00 +0100 From: Ionela Voinescu To: Viresh Kumar Subject: Re: [PATCH v2 3/7] arch_topology: disable frequency invariance for CONFIG_BL_SWITCHER Message-ID: <20200810090100.GA7190@arm.com> 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> <20200804063046.a2hw5cxwiewhb3aw@vireshk-mac-ubuntu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200804063046.a2hw5cxwiewhb3aw@vireshk-mac-ubuntu> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200810_050108_385847_F76C30AF X-CRM114-Status: GOOD ( 31.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: linux-pm@vger.kernel.org, peterz@infradead.org, catalin.marinas@arm.com, rjw@rjwysocki.net, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, mingo@redhat.com, sudeep.holla@arm.com, will@kernel.org, Dietmar Eggemann , 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 Hi guys, On Tuesday 04 Aug 2020 at 12:00:46 (+0530), Viresh Kumar wrote: > 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 :) > I gave it a bit of time in case anyone had strong opinions about this, but given the lack of those, what I can do in this series is the following: ignore the problem :). This issue was there before these patches and it will continue to be there after these patches - nothing changes. Separately from this series, I can submit a patch with Viresh's suggestion above and we can spin around a bit discussing this, if there is interest. My opinion on this is that option 1 is ugly but it does fix an issue in a relatively non-invasive way. I agree with "I don't think anyone will care about FIE for the switcher anyway", but for me this means that nobody will care if it's supported (and therefore option 1 is the proper solution). But if bL switcher is used, I think people might care if it's broken, as it results in incorrect scheduler signals. Therefore, I would not like leaving it broken (option 3). If it's not used, option 2 is obvious. Many thanks, Ionela. > -- > viresh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel