Received: by 10.213.65.68 with SMTP id h4csp3535014imn; Tue, 10 Apr 2018 00:00:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx491oFjb6kJf92mh4bQgMz40wESmZZG2u1q1o02zFEYCMIDVgScjIPyHlJXP7YnclpV7hpjR X-Received: by 2002:a17:902:ac8a:: with SMTP id h10-v6mr42242192plr.290.1523343601983; Tue, 10 Apr 2018 00:00:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523343601; cv=none; d=google.com; s=arc-20160816; b=aX1aGTzjbTnLQN5n6Tpbf0LZvl41zGNsqvH/zwnTPASEkAXaruorC1+N40B1Da7nxh iQ/om08LiWfL/bxWBUcKxocUlpzS6EoIP7Y7x9Ph+32wUbiZXgmBt0CSwzMW3X245ahY 7rxF+T7rEQcBl83CXt7C3KycSymVpCUq0EwjeWA0u/qKQopu9VqRerSFV1aSrUyERhQN tg65VSzvuvz3W1EDJCCJ8abqQY8HBv90gqRVxYU2mcynMlx46htZLtsau14IUTeltpXq bqvmSjORGMRZZiMTObG1hQDP4hEAjZy7cnVzbtEuKoJcPUaHadVXNR/RdjH+5CanZShK Z2UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=U+sJtK+B5EpjB5g9PbXhKixdxp5naxdwfLz4Yel/NQc=; b=zd2Kmk3Kh+pHoWGwbx8g3s0rV1mNvr6rliY3rYB0zQ6A65+930B+mcx3bpUpIciNWl JhkWezOT4rziv28kPGRvmCbtpWSaxo5GHwaPl/lxYPXtQdWBigaWg2kUK25AiXbbY+Dc mHAyMhBPOO7TSjtjoiZDXwbqafiYg9B6o8/oEdakhTz+1u8BVDagIz2DmUpX5W7oTt0q WlXkvtse6lzsjQn7UpJE87IaSct8t5LIL1WQExgjsSUNhbyJK8odusW/s2S3GFHoV3Ux GE9wLXd8tLsXUcNU6Tdrgl5WWalzR090ajGAWirpUoZkFiIwc3pBPrIosKGohMZ0e20Q qcgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=MtVp6Lad; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s3-v6si1033397plq.672.2018.04.09.23.59.24; Tue, 10 Apr 2018 00:00:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=MtVp6Lad; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752255AbeDJGzR (ORCPT + 99 others); Tue, 10 Apr 2018 02:55:17 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:40639 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751820AbeDJGzP (ORCPT ); Tue, 10 Apr 2018 02:55:15 -0400 Received: by mail-ot0-f195.google.com with SMTP id j8-v6so11563979ota.7; Mon, 09 Apr 2018 23:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=U+sJtK+B5EpjB5g9PbXhKixdxp5naxdwfLz4Yel/NQc=; b=MtVp6LadgIWK+W2j8sNXl0p/6S0QJVU+5lC4FDt6oXidD1BMCgYuHC6T1yu2F5UrUw kmSzNjBKqAXNId8KABpgcvyQRGgklyIwpESnuUczi05OS/iqx7liMHhgzQuclRAbfEES K6u0shSWoHQ0V+DdIAcYqNz8jsa1SsBKwMFmpZS+sTxggLHoyWY5vU/xY2dZx4XFHrLv n7XfoS3wWvZg3EoCZiJFoozDXZd+p5ry6jYJ7f/tnuttQUphzWE4A5VA4XtlW+A4gx9t YRnSUJZcbikeNbRu2QyxvWlLljRN/97tweRY0m4Lv4nZKJIU3Zqh/BiOd/X+2ev4Zzpq XG7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=U+sJtK+B5EpjB5g9PbXhKixdxp5naxdwfLz4Yel/NQc=; b=VnjIm9hMOxMMlwwIq9t/7NjG9PLi58TNKWIXr1PPjUAV+7r37wJr3G//SW+8gHJYhl Ca86hjDFoVFOrvCFiPOwxJN84ZEWnxfZnCCmv2PQ/vmNjrsWzYEt6fP0LRSpte7k7CIH PPmliPozWEIfBG0eLNVwgiA2SnNNAnJaDlW7taxU8pkJd46Q4kLmcZpKKb2ELaJ7GD2U TWME6cOEq6WewXfs2MtPs4RbXjRI/62StMEnTYnjX5wgHz8soH1bAZv0UPd7E2JrayH+ wYa81cbHAptxwpxj4VDRI02Cy8qcc/rahawb3qmaf/Csszvg5oa92bBMTJ9OBBu/3DU9 84Dg== X-Gm-Message-State: ALQs6tBBE9MLenxwzV7Kkysla8c8qvSUjpl5k8XssRkLa0pNMUZU3pcv FanfZ1ZJCQovuz6rdL5TCqPNPf8c9Uil2MuMJN8= X-Received: by 2002:a9d:4811:: with SMTP id c17-v6mr23350420otf.291.1523343315260; Mon, 09 Apr 2018 23:55:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:9f7:0:0:0:0:0 with HTTP; Mon, 9 Apr 2018 23:55:14 -0700 (PDT) In-Reply-To: <20180409164205.GA3520@e108498-lin.cambridge.arm.com> References: <20180320094312.24081-1-dietmar.eggemann@arm.com> <20180320094312.24081-3-dietmar.eggemann@arm.com> <20180409120111.GA4043@hirez.programming.kicks-ass.net> <20180409134510.GA4577@e108498-lin.cambridge.arm.com> <20180409153233.GA4082@hirez.programming.kicks-ass.net> <20180409164205.GA3520@e108498-lin.cambridge.arm.com> From: "Rafael J. Wysocki" Date: Tue, 10 Apr 2018 08:55:14 +0200 X-Google-Sender-Auth: DSbZ3cuP4m344q5541DKddiIsXs Message-ID: Subject: Re: [RFC PATCH 2/6] sched: Introduce energy models of CPUs To: Quentin Perret Cc: Peter Zijlstra , Dietmar Eggemann , Linux Kernel Mailing List , Thara Gopinath , Linux PM , Morten Rasmussen , Chris Redpath , Patrick Bellasi , Valentin Schneider , "Rafael J . Wysocki" , Greg Kroah-Hartman , Vincent Guittot , Viresh Kumar , Todd Kjos , Joel Fernandes Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 9, 2018 at 6:42 PM, Quentin Perret wrote: > On Monday 09 Apr 2018 at 17:32:33 (+0200), Peter Zijlstra wrote: >> On Mon, Apr 09, 2018 at 02:45:11PM +0100, Quentin Perret wrote: >> >> > In this specific patch, we are basically trying to figure out the >> > boundaries of frequency domains, and the power consumed by each CPU >> > at each OPP, to make them available to the scheduler. The important >> > thing here is that, in both cases, we rely on the OPP library to >> > keep the code as platform-agnostic as possible. >> >> AFAICT the only users of this PM_OPP stuff is a bunch of ARM platforms. > > That's correct. > >> Granted, body else has build a big.little style system, so that might >> all be fine I suppose. >> >> It won't be until some !ARM chip comes along that we'll know how >> generically usable any of this really is. >> > > Right. There is already a lot of diversity in the Arm ecosystem that has > to be managed. That's what I meant by platform-agnostic. Now, I agree > that it should be discussed whether or not this is enough for other > archs ... Even for ARM64 w/ ACPI, mind you. > It might be reasonable to expect from the archs who want to use EAS that > they expose their OPPs in the OPP lib. That should be harmless, and EAS > needs to know about the OPPs, so they should be made visible, ideally > somewhere generic. Otherwise, that means the interface with the > EAS has to be defined only by the energy model data structures, and the > actual energy model loading procedure becomes free-form arch code. > > I quiet like the first idea from a pure design standpoint, but I could > also understand if maintainers of other archs were reluctant to > have new dependencies on PM_OPP ... Not just reluctant I would think. Depending on PM_OPP directly here is like depending on ACPI directly. Would you agree with the latter? >> > In the case of the frequency domains for example, the cpufreq driver is >> > in charge of specifying the CPUs that are sharing frequencies. That >> > information can come from DT, or SCPI, or SCMI, or whatever -- we >> > probably shouldn't have to care about that from the scheduler's >> > standpoint. That's why using dev_pm_opp_get_sharing_cpus() is handy, >> > the OPP library gives us the digested information we need. >> >> So I kinda would've expected to just ask cpufreq, that after all already >> knows these things. Why did we need to invent this pm_opp thing? > > Yes, we can definitely rely on cpufreq for this one. There is a "strong" > dependency on PM_OPP to get power values, so I decided to use PM_OPP for > the frequency domains as well, for consistency. But I can change that if > needed. Yes, please. >> >> Cpufreq has a tons of supported architectures, pm_opp not so much. >> >> > The power values (dev_pm_opp_get_power) we use right now are those >> > already used by the thermal subsystem (IPA), which means we don't have >> >> I love an IPA style beer, but I'm thinking that's not the same IPA, >> right :-) > > Well, both can help to chill down in a way ... :-) > > The IPA I'm talking about means Intelligent Power Allocator. It's a > thermal governor that uses a power model of the platform to allocate > power budgets to CPUs & GPUs using a control loop. The code is in > drivers/thermal/power_allocator.c if this is of interest. > >> >> > to introduce any new DT binding whatsoever. In a close future, the power >> > values could also come from other sources (SCMI for ex), and again it's >> > probably not the scheduler's job to care about those things, so the OPP >> > library is helping us again. As mentioned in the notes, as of today, this >> > approach has dependencies on other patches relating to these things which >> > are already on the list [1]. >> >> Is there any !ARM thermal driver? (clearly I'm not up-to-date on things >> thermal). > > I don't think so. No, there isn't, AFAICS. Thanks!