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.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 452FDC2D0A3 for ; Fri, 6 Nov 2020 10:39:09 +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 BA16520720 for ; Fri, 6 Nov 2020 10:39:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KC/+a0NA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA16520720 Authentication-Results: mail.kernel.org; dmarc=fail (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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UmFqlQFEukZVBvT4fmr699k4eLtvVOPdIEZlTOfYkSI=; b=KC/+a0NAcTVgarPEPgF8oeTAQ EFICnfBpTBVWy5+1ICiclP91QZUfHPoEvRCe+klkoEBZZlg0Eecf+JwmJYttlJ+hj0wNJbYOuggPz VSY30uhnLqvpydUOZLrXFEnRmnmRlmE6g+nlKkQonbCFz6RD6a/RRXfaH4CRU3gfcRYUqBPG3tdFC fr3y2sJ5R3wHRjYsAHSq80OZpucmSLxtvyp9zjSctCbneanVu7ZA1lCoGQJV9K2B5qzqdHzq/KmMu //K8t8yhUPsR+sNIO6vCMGm30ios+XMzSnHfKTjjV/GnjF4n80FIgfETm9A5yujL5fzo02TcMQsw7 ekgovruow==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaz86-000524-RP; Fri, 06 Nov 2020 10:38:02 +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 1kaz83-00050w-Is for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 10:38:00 +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 B57BA147A; Fri, 6 Nov 2020 02:37:56 -0800 (PST) Received: from [10.57.14.85] (unknown [10.57.14.85]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6AE973F719; Fri, 6 Nov 2020 02:37:53 -0800 (PST) Subject: Re: [PATCH v3 3/3] [RFC] CPUFreq: Add support for cpu-perf-dependencies To: Viresh Kumar , Nicola Mazzucato References: <20201102120115.29993-1-nicola.mazzucato@arm.com> <20201102120115.29993-4-nicola.mazzucato@arm.com> <20201106092020.za3oxg7gutzc3y2b@vireshk-i7> From: Lukasz Luba Message-ID: <0a334a73-45ef-58ff-7dfd-9df6f4ff290a@arm.com> Date: Fri, 6 Nov 2020 10:37:51 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20201106092020.za3oxg7gutzc3y2b@vireshk-i7> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201106_053759_691107_C1F67C3C X-CRM114-Status: GOOD ( 24.49 ) 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: nm@ti.com, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, sboyd@kernel.org, vireshk@kernel.org, daniel.lezcano@linaro.org, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, robh+dt@kernel.org, sudeep.holla@arm.com, chris.redpath@arm.com, morten.rasmussen@arm.com, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Viresh, On 11/6/20 9:20 AM, Viresh Kumar wrote: > On 02-11-20, 12:01, Nicola Mazzucato wrote: >> This is a continuation of the previous v2, where we focused mostly on the >> dt binding. >> >> I am seeking some feedback/comments on the following two approaches. >> >> Intro: >> We have seen that in a system where performance control and hardware >> description do not match (i.e. per-cpu), we still need the information of >> how the v/f lines are shared among the cpus. We call this information >> "performance dependencies". >> We got this info through the opp-shared (the previous 2 patches aim for >> that). >> >> Problem: >> How do we share such info (retrieved from a cpufreq driver) to other >> consumers that rely on it? I have two proposals. > > I haven't really stop thinking about what and how we should solve > this, but I have few concerns first. > >> 2) drivers/thermal/cpufreq_cooling: Replace related_cpus with dependent_cpus > > I am not sure if I understand completely on how this is going to be > modified/work. > > The only use of related_cpus in the cooling driver is in the helper > cdev->get_requested_power(), where we need to find the total power > being consumed by devices controlled by the cooling device. Right ? > > Now the cooling devices today are very closely related to the cpufreq > policy, the registration function itself takes a cpufreq policy as an > argument. > > Consider that you have an octa-core platform and all the CPUs are > dependent on each other. With your suggested changes and hw control, > we will have different cpufreq policies for each CPU. And so we will > have a cooling device, cdev, for each CPU as well. When the IPA > governor calls cdev->get_requested_power(), why should we ever bother > to traverse the list of dependent_cpus and not related_cpus only ? > > Otherwise the same CPU will have its load contributed to the power of > 8 cooling devices. > Good question. How about a different interface for those cpufreq drivers? That new registration API would allow to specify the cpumask. Or rely on EM cpumask: em_span_cpus(em) Currently we have two ways to register cooling device: 1. when the cpufreq driver set a flag CPUFREQ_IS_COOLING_DEV, the core will register cooling device 2. cpufreq driver can explicitly call the registration function: cpufreq_cooling_register() with 'policy' as argument That would need substantial change to the cpufreq cooling code, from policy oriented to custom driver's cpumask (like EM registration). Regards, Lukasz _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel