Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp584065rwi; Mon, 10 Oct 2022 04:47:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM510/g57h1g1fnmVZIsp4K4J52q7fdrWr/gIbHoaqooXZpD9Y2uYPCtBroDANkQHZo9vlLC X-Received: by 2002:a17:906:5a6d:b0:78d:a139:669b with SMTP id my45-20020a1709065a6d00b0078da139669bmr6526526ejc.581.1665402443103; Mon, 10 Oct 2022 04:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665402443; cv=none; d=google.com; s=arc-20160816; b=yRUgjskvC1Z3J8LTfUpRiSwJdP4/09FA+4Sf7hhkrk0+/cKIz/AxjkkZNSqwYM24KD lNv1nnC7dI8eryzw+QpR3ze9THmJVb5FXe7fvMZXk4VaEI5Rq3i9IudbIt3sQxC9kE69 jkQeEtClszhMQxXjkADT/XoME5oXF+/cZvsBi8v4nJvhbVO3HEoKD52OY+hYrvTjXe6h hT8mjBAMlJa9Z7Xt916lmuc4D1a8F0H+SgpNxZ1jpTVBcjT0HMDvci3MEfUVTBNib5PT YlN49GL6VNrquu3RvvYmWN4N/qTir2RWWAJ/59PxGAct4f7iGBYxgTyvOjOqovWJhLSF 1RVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=qmH90mNnYUvAamLSnMnvAspjQdU1YeOyC8t+h8mGEkE=; b=d8VXN1We27/RrZZjziYeNyzruOevnATFrd1lGBbxd26gvTf8bGj15Q3QlZ9K6hUASQ u4XAOCFDwuFcuHetKCKP/XexdjxovLQA6fLH0fk0y2mb2BfYFvhQT1b6egUdaugfmcXE iDKo3SW5PFXmRKNNy/C3RD28Db19NINOwdfjkDrMYyUPoBcnBNqF8WtYFi5JdhPC8OVT 32og8VuVhkkmEEgFlk+3ZuWOVWniRLexgzsYalq1GoUATX4Mhohtps32AUR4kw6llsWT Gux5tiFCVxRpMZoBpEb9WGZEaDGrV9e+8fNc9PhFsoX8ikMaGC+3AF/EpMD2SEk7eq01 3WVA== 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 z4-20020a05640235c400b00457e3ae2e5dsi10840862edc.34.2022.10.10.04.46.57; Mon, 10 Oct 2022 04:47:23 -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 S231329AbiJJKqn (ORCPT + 99 others); Mon, 10 Oct 2022 06:46:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231218AbiJJKqe (ORCPT ); Mon, 10 Oct 2022 06:46:34 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F1C1D67C95; Mon, 10 Oct 2022 03:46:32 -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 E548E1480; Mon, 10 Oct 2022 03:46:38 -0700 (PDT) Received: from [10.57.5.39] (unknown [10.57.5.39]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 50A333F792; Mon, 10 Oct 2022 03:46:31 -0700 (PDT) Message-ID: <7ded9241-6c21-6631-8910-9f1150db6724@arm.com> Date: Mon, 10 Oct 2022 11:46:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 2/2] cpufreq: Update CPU capacity reduction in store_scaling_max_freq() Content-Language: en-US To: Peter Zijlstra Cc: Vincent Guittot , Viresh Kumar , linux-kernel@vger.kernel.org, rafael@kernel.org, linux-pm@vger.kernel.org, Dietmar.Eggemann@arm.com, "daniel.lezcano@linaro.org" References: <20220930094821.31665-1-lukasz.luba@arm.com> <20220930094821.31665-2-lukasz.luba@arm.com> <20221010053902.5rofnpzvyynumw3e@vireshk-i7> <3f9a4123-171b-5fa7-f506-341355f71483@arm.com> <8a7968c2-dbf7-5316-ef36-6d45143e0605@arm.com> <9611971c-d8dd-7877-6f50-c5afbf38b171@arm.com> From: Lukasz Luba In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE 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 +CC Daniel, since I have mentioned a few times DTPM On 10/10/22 11:25, Peter Zijlstra wrote: > On Mon, Oct 10, 2022 at 11:12:06AM +0100, Lukasz Luba wrote: >> BTW, those Android user space max freq requests are not that long, >> mostly due to camera capturing (you can see a few in this file, >> e.g. [1]). > > It does what now ?!? Why is Android using this *at*all* ? It tries to balance the power budget, before bad things happen randomly (throttling different devices w/o a good context what's going on). Please keep in mind that we have ~3 Watts total power budget in a phone, while several devices might be suddenly used: 1. big CPU with max power ~3-3.5 Watts (and we have 2 cores on pixel6) 2. GPU with max power ~6Watts (normally ~1-2Watts when lightly used) 3. ISP (Image Signal Processor) up to ~2Watts 4. DSP also up to 1-2Watts We don't have currently a good mechanism which could be aware of the total power/thermal budget and relations between those devices. Vendors and OEMs run experiments on devices and profile them to work more predictable in those 'important to users' scenarios. AFAIK Daniel Lescano is trying to help with this new interface for PowerCap: DTMP. It might be use as a new interface for those known scenarios like the camera snapshot. But that interface is on the list that I have also mentioned - it's missing the notification mechanism for the scheduler reduced capacity due to user-space new scenario.