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=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 8B11BC433DF for ; Fri, 16 Oct 2020 14:42:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24EEC20866 for ; Fri, 16 Oct 2020 14:42:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="DDrufvjw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405605AbgJPOmI (ORCPT ); Fri, 16 Oct 2020 10:42:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395258AbgJPOmI (ORCPT ); Fri, 16 Oct 2020 10:42:08 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33349C061755 for ; Fri, 16 Oct 2020 07:42:08 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id o9so1388567plx.10 for ; Fri, 16 Oct 2020 07:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YPuIiy1x2gyQnunEdwb5wy6HvXF5oFtf7JOZzScqMK0=; b=DDrufvjwHDKQ8iJUQE8GHUYBUmkAiCppfEChZjpFslFPtAR7eByXOdRhV04xfwHQ2d Jtt/nyPuKmFri4TvzYe92S+CeTEs7R+uF0WIP6N6n5PEFudd9O5lUnBgNHt2d12msuLm 71yjl3LiMmG1TvFVcUEE5eo+EubpXnsSEqoGc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YPuIiy1x2gyQnunEdwb5wy6HvXF5oFtf7JOZzScqMK0=; b=cD6q6OVK17ixgg5ByOMMfCVrGMlexqKHu+j8rlW2GaXa0QzdzvMcIBQzpnI0T2satm JdjI8ZId8/8f0zbEH3u3KCZyQicbhS3kbNSMRS4Fn0Vvic3uxvwhEgkuf42vtWol2hxg 7GX6J4XBUsENIyS0uaz3v0EzpR+lXrKiQLrQ+ouM278FLiHTsUSG1FDoKHDgRlQeJJ2u poaNX7AXKJnI+S6eOiKK4qJmsFirklrmrJkbkV50ndfQSb3Pj77o/4MIxvWdy7Ie2fRB dYRAtNMXr7Uk2CnStMkZrpvbZsJHWEv/TU9QTXpGkLXdl1E4Z4X3Wiue1zwY6c+oPK45 Jv9Q== X-Gm-Message-State: AOAM532zYCzC6E+omX7fzju/aHICyIDS5WOq3PQIAbgm+9i+Np5tK5Ji 0oZ38cYFelkB/tcBOcjf2EKrtZJRJ5Ur0g== X-Google-Smtp-Source: ABdhPJw/OiqjlQy13wJ5c3DBsfN8ilJde7iToaC3pbMAIQMHNQ4Sj4p65h7wR8fOB/0+0dHsFpsqwg== X-Received: by 2002:a17:902:8a97:b029:d4:d3f4:d209 with SMTP id p23-20020a1709028a97b02900d4d3f4d209mr4436778plo.35.1602859327385; Fri, 16 Oct 2020 07:42:07 -0700 (PDT) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com. [209.85.210.180]) by smtp.gmail.com with ESMTPSA id z142sm3143335pfc.179.2020.10.16.07.42.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Oct 2020 07:42:07 -0700 (PDT) Received: by mail-pf1-f180.google.com with SMTP id x13so1615301pfa.9 for ; Fri, 16 Oct 2020 07:42:07 -0700 (PDT) X-Received: by 2002:a67:ec9a:: with SMTP id h26mr2255406vsp.34.1602858975177; Fri, 16 Oct 2020 07:36:15 -0700 (PDT) MIME-Version: 1.0 References: <55d3fb0f-f7d8-63c5-2bdb-53eaa62380e0@linaro.org> <3e3dd42c-48ac-7267-45c5-ca88205611bd@arm.com> <00ceec64-3273-bb4a-6f38-22de8d877ab5@linaro.org> <20201016121844.GA2420691@google.com> <20201016130905.GA2426638@google.com> In-Reply-To: <20201016130905.GA2426638@google.com> From: Doug Anderson Date: Fri, 16 Oct 2020 07:36:03 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/3] Clarify abstract scale usage for power values in Energy Model, EAS and IPA To: Quentin Perret Cc: Daniel Lezcano , "Rafael J. Wysocki" , Lukasz Luba , "Rafael J. Wysocki" , Linux Kernel Mailing List , Linux PM , "open list:DOCUMENTATION" , "devicetree@vger.kernel.org" , Rob Herring , Amit Kucheria , Jonathan Corbet , Dietmar Eggemann , Matthias Kaehlcke , "Nayak, Rajendra" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, On Fri, Oct 16, 2020 at 6:09 AM Quentin Perret wrote: > > On Friday 16 Oct 2020 at 14:50:29 (+0200), Daniel Lezcano wrote: > > On 16/10/2020 14:18, Quentin Perret wrote: > > > On Friday 16 Oct 2020 at 13:48:33 (+0200), Daniel Lezcano wrote: > > >> If the SCMI is returning abstract numbers, the thermal IPA governor will > > >> use these numbers as a reference to mitigate the temperature at the > > >> specified sustainable power which is expressed in mW in the DT. So it > > >> does not work and we can not detect such conflict. > > >> > > >> That is why I'm advocating to keep mW for the energy model and make the > > >> SCMI and DT power numbers incompatible. > > > > > > I think it's fair to say SCMI-provided number should only be compared to > > > other SCMI-provided numbers, so +1 on that. But what I don't understand > > > is why specifying the EM in mW helps with that? > > > > It is already specified in mW. I'm just saying to not add the > > 'scale'/'abstract'/'bogoWatt' in the documentation. > > > > > Can we not let the providers specify the unit? > > > > Yes, it is possible but the provider must give the 'unit' and the energy > > model must store this information along with the "power" numbers, so we > > can compare apple with apple. > > > > Today, the energy model is using the mW unit only and the providers are > > not telling the 'unit', so both are missing. > > > > Because both are missing, it does not make sense to talk about > > 'abstract' values in the energy model documentation until the above is > > fixed. > > Right, so that sounds like a reasonable way forward with this series. > > Lukasz would you be able to re-spin this with a first patch that allows > the EM provider to specify a unit? And perhaps we could use Doug's idea > for the sustained power DT binding and allow specifying a unit > explicitly there too, so we're sure to compare apples with apples. The one issue that I started with, though, is that I wanted to be able to specify "sustainable-power" for a board in the device tree. Unless you think you'll convince Rob that it's OK to provide a "units" property in the device tree then just adding a "units" to the API won't help us because you'll still be stuck mixing/matching with a value based in mW, right? ...or are you suggesting that the board-specific value "sustainable-power" would also have to come from SCMI? That would be pretty annoying. -Doug