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=-8.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 C8001C433E0 for ; Thu, 30 Jul 2020 11:46:18 +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 911342082E for ; Thu, 30 Jul 2020 11:46:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Gql57SjW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 911342082E 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=oeK+HE+9FNcFJbCLalJ6kgJDO6Kda3mZ2R5St3Ng8H8=; b=Gql57SjW34G1XIJB8qGfkrVLl oLUll6xYlrPdbfJ4rbxSLVzdCgzLg8S36rnz749R4prExO1L9cahppJmszm0vcp+LEgqteYE3pCNl Mh+G6J9zYNkldxpbzVLZ8SHx8zAn+bOJ6QQAHMRy4XsHdErp8tFHk4U3CYkMlvNq6/AyIO8J54CwE 7veUtvoxraybi2/FBJoT4KjIjRg0aja/sXhHBHvJaB/Te5UXLB+VZaimhe7uyQWt71gB8N8WxPnAH s0mOXtovMV8cSfREJ4a6zXXY/lYbx6D1517HMmeZcm1d+91BDirYcagrE3dPw4WCoxPodD1U95zut 8rlkJlLRQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k16zX-0006mg-L8; Thu, 30 Jul 2020 11:44:55 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k16zV-0006lh-Ac for linux-arm-kernel@lists.infradead.org; Thu, 30 Jul 2020 11:44:54 +0000 Received: from gaia (unknown [95.146.230.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9FDAD2082E; Thu, 30 Jul 2020 11:44:50 +0000 (UTC) Date: Thu, 30 Jul 2020 12:44:48 +0100 From: Catalin Marinas To: Ionela Voinescu Subject: Re: [PATCH v2 6/7] arch_topology,arm,arm64: define arch_scale_freq_invariant() Message-ID: <20200730114447.GK25149@gaia> References: <20200722093732.14297-1-ionela.voinescu@arm.com> <20200722093732.14297-7-ionela.voinescu@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200722093732.14297-7-ionela.voinescu@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200730_074453_462303_5A2E682D X-CRM114-Status: GOOD ( 20.63 ) 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, viresh.kumar@linaro.org, Valentin Schneider , rjw@rjwysocki.net, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, mingo@redhat.com, sudeep.holla@arm.com, will@kernel.org, dietmar.eggemann@arm.com, 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 Wed, Jul 22, 2020 at 10:37:31AM +0100, Ionela Voinescu wrote: > From: Valentin Schneider > > arch_scale_freq_invariant() is used by schedutil to determine whether > the scheduler's load-tracking signals are frequency invariant. Its > definition is overridable, though by default it is hardcoded to 'true' > if arch_scale_freq_capacity() is defined ('false' otherwise). > > This behaviour is not overridden on arm, arm64 and other users of the > generic arch topology driver, which is somewhat precarious: > arch_scale_freq_capacity() will always be defined, yet not all cpufreq > drivers are guaranteed to drive the frequency invariance scale factor > setting. In other words, the load-tracking signals may very well *not* > be frequency invariant. > > Now that cpufreq can be queried on whether the current driver is driving > the Frequency Invariance (FI) scale setting, the current situation can > be improved. This combines the query of whether cpufreq supports the > setting of the frequency scale factor, with whether all online CPUs are > counter-based FI enabled. > > While cpufreq FI enablement applies at system level, for all CPUs, > counter-based FI support could also be used for only a subset of CPUs to > set the invariance scale factor. Therefore, if cpufreq-based FI support > is present, we consider the system to be invariant. If missing, we > require all online CPUs to be counter-based FI enabled in order for the > full system to be considered invariant. > > If the system ends up not being invariant, a new condition is needed in > the counter initialization code that disables all scale factor setting > based on counters. > > Precedence of counters over cpufreq use is not important here. The > invariant status is only given to the system if all CPUs have at least > one method of setting the frequency scale factor. > > Signed-off-by: Valentin Schneider > Signed-off-by: Ionela Voinescu > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Sudeep Holla Acked-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel