Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1017439pxb; Tue, 29 Mar 2022 15:06:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/tEqSEjoZEqZFawb10OtUWhqBYryRxZ+qlKN8GI+z3S5TYXxV1O80gsSOgbgab/IBdK2x X-Received: by 2002:a17:902:e9d5:b0:156:355a:1d23 with SMTP id 21-20020a170902e9d500b00156355a1d23mr3235817plk.109.1648591590076; Tue, 29 Mar 2022 15:06:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648591590; cv=none; d=google.com; s=arc-20160816; b=HfANgj2vg4PVQbGyZe0+4ZAmC6fk21OujQcH/VlBLQ00WjQdEjf+3JnbUOEZlSKZi1 AAznOxDXiRzNrZ6/fWHwwbOGzmaRqGaOG6+BXRxOg1qBXz/5N0lFplLbAXep6Dki3hyR +nGHzSMgEJY7BokFVq8PkZ6AnyJJOP8fMr1IqEaGFlnZyZqo7DGPf1BVQ0mU+k9/mFY9 8aBoekvHcaHAbPKF7gtacweANZXpxlgTe3EqWNCO74cZRyGnuKE2g6rXFNLN94GfRwQD rZYF60UHZjof+SejNkOGgPBOi1P3dUnTbTC817ZAoA9akx/TEDqbvoEaJO+Ienz0s+03 OUZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=PsZMjorvZMMiMVlspCH6i9VL9YsWBKgHqJxvon9EPfY=; b=MrzaKo+fwpci4U97FwA0yA/i0e/hUfURTsqj1MGPibcJspYOPTNl/CJoiJhyMvjhaE /u2np/P0D2qclyPMQgT/pWBLGBO46hctazhBXKd6GKPT57B+rM8ADOapBd6Ln8DUkUoj I/Irh1uHRQCC40VOcrK4vxM+l1hShpgcVoClyakxwXWa+zSCDXGVAWeV+yobe4TGzsKX wKCDOs31tyiUWLVvj+elb23qwN1OIJDISgXoGSxYz/rnB53FMm/nVV5RKrF7tmclqBQg cmHHUXvlwRArmbTIiSMLld9YZGBcIXgV5Ah9aBc5yeKxaFX4qwYHDN4t3hYfJkEdwZ6t gVgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a62d445000000b004fb47469b7asi5643924pfl.87.2022.03.29.15.06.15; Tue, 29 Mar 2022 15:06:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236234AbiC2Nbe (ORCPT + 99 others); Tue, 29 Mar 2022 09:31:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237304AbiC2Nbc (ORCPT ); Tue, 29 Mar 2022 09:31:32 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C50A01C119; Tue, 29 Mar 2022 06:29:49 -0700 (PDT) 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 3B8E323A; Tue, 29 Mar 2022 06:29:49 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3AC0C3F73B; Tue, 29 Mar 2022 06:29:47 -0700 (PDT) Date: Tue, 29 Mar 2022 14:29:45 +0100 From: Cristian Marussi To: Lukasz Luba Cc: linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com, Pierre.Gondois@arm.com, ionela.voinescu@arm.com, viresh.kumar@linaro.org, rafael@kernel.org, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org, mka@chromium.org, nm@ti.com, sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, sudeep.holla@arm.com, matthias.bgg@gmail.com Subject: Re: [0/8] Introduce support for artificial Energy Model Message-ID: References: <20220316235211.29370-1-lukasz.luba@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220316235211.29370-1-lukasz.luba@arm.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 16, 2022 at 11:52:03PM +0000, Lukasz Luba wrote: > Hi all, > Hi Lukasz, > This patch set adds new callback and support for artificial Energy Model (EM). > The new EMs have artificially generated performance states. > Such EMs can be created from lean information sources, such > as the relative energy efficiency between CPUs. The ACPI based > platforms provide this information > (ACPI 6.4, s5.2.12.14 'GIC CPU Interface (GICC) Structure' > 'Processor Power efficiency Class' field). > > Artificial EMs might require to directly provide the 'cost' of > the generated performance state. This patch set adds a new callback > .get_cost() for this. The EM framework does not force any model > or formula, it's up to the platform code. > > Artificial EMs aim to leverage the Energy Aware Scheduler > (EAS). Other frameworks relying on performance states > information (i.e. IPA/DTPM) must be informed of the > EM type and might be prevented from using it. This patch > sets also does this by introducing a new flag: > EM_PERF_DOMAIN_ARTIFICIAL. > > The patch set is based on current linux-next, where some > changes to OPP & EM are queuing. > > The patch set also contains (patch 7/8 and patch 8/8) logic which prevents > two EM's client frameworks from using this new EM type. Some other approach, > using 'milli-watts', has been proposed and discussed, but refused [1]. > This new flag is more precised and should not leave space for > wrong interpretation. > > Shortly after this patch set you will see a patch set implementing the > platform code and registering this new EM. > Just to let you know that in the few days I'm going to post the first chunk of some SCMIv3.1 additions that includes also (as you probably know) the SCMI Perf protocol support for reporting perf_domain costs in micro-watts and not only in milli-watts. Given that it does not seem that as of now the em_ API used by the SCMI cpufreq driver can make use of this new scale (and being not at all familiar with EM/EAS for sure :P), the SCMIv3.1 'Perf micro-watts' patch which I will post (I'll CC you) does NOT expose any new interface but only takes care to store the new micro-watts capability internally in a flag (if advertised by an SCMIv3.1 backend server), so that, basically, you'll keep seeing from the SCMI cpufreq driver that the scale is milli-watt (when milli-watts are used of course) or non-milli-watt (for abstract and micro-watts scales). This is intended to be of course a first step, laying out just the bare minimum commmon internal SCMI support, until we figure out how to properly expose this from the SCMI Perf in order to make it usable for EM. (if neeeded at all). Thanks, Cristian