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.5 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 35AC9C433DF for ; Wed, 5 Aug 2020 11:06:20 +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 E983722D01 for ; Wed, 5 Aug 2020 11:06:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ix0HtHZ7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E983722D01 Authentication-Results: mail.kernel.org; dmarc=none (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=IAWF5MKVJuyQUKbeaccrhyKHEXLLGksOZD9iO0UGbDo=; b=ix0HtHZ7YEOlf+4qRG2W6E6ll eaXq4U/a1S3tfdtLAc6bhFOgGdWmfR7ZfjZsZZxKkxeDdnHcFxT0b256DOnPThiQp3aA+BhkoeT61 mYoYWTj8GopTwYVdZKCB6UaUiyubpd24WDUZGPjcPsW4P9SPWAUI9LfyPFtfdKh3xsHnhVTSLTw9W bmGvYqJ/+/m/Y8XxaUhu2NZJByClRpK7z5aCCsoO+t1vpaBUaDloqVomwzvxnTPUdYmz9djCUArLF kf9RQDSmHEd0X2fxla00E/3TsJcnTo0c3pevg+hyhDztP+WyfHu0LuggjljZyWlXVFwjJv/wWeYrK oVSUAXnGg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3HE4-0005yn-Fh; Wed, 05 Aug 2020 11:04:52 +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 1k3HE0-0005x3-HD for linux-arm-kernel@lists.infradead.org; Wed, 05 Aug 2020 11:04:49 +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 BD457D6E; Wed, 5 Aug 2020 04:04:46 -0700 (PDT) Received: from [10.37.12.81] (unknown [10.37.12.81]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E4C2F3FA32; Wed, 5 Aug 2020 04:04:44 -0700 (PDT) Subject: Re: [PATCH 0/4] CPUFreq statistics retrieved by drivers To: Florian Fainelli , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org References: <20200729151208.27737-1-lukasz.luba@arm.com> From: Lukasz Luba Message-ID: <119ce268-18dc-7a4c-b0b2-3a66ff9ff4b0@arm.com> Date: Wed, 5 Aug 2020 12:04:42 +0100 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: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200805_070448_672876_C75EF0BF X-CRM114-Status: GOOD ( 22.13 ) 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: viresh.kumar@linaro.org, rjw@rjwysocki.net, cristian.marussi@arm.com, sudeep.holla@arm.com 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 On 8/4/20 6:27 PM, Florian Fainelli wrote: > > > On 7/29/2020 8:12 AM, Lukasz Luba wrote: >> Hi all, >> >> The existing CPUFreq framework does not tracks the statistics when the >> 'fast switch' is used or when firmware changes the frequency independently >> due to e.g. thermal reasons. However, the firmware might track the frequency >> changes and expose this to the kernel. > > Or the firmware might have changed the CPU frequency in response to a > request from the secure world for instance. Possible > >> >> This patch set aims to introduce CPUfreq statistics gathered by firmware >> and retrieved by CPUFreq driver. It would require a new API functions >> in the CPUFreq, which allows to poke drivers to get these stats. > > From a debugging perspective, it would be helpful if the firmware > maintained statistics were exposed as a super-set of the Linux cpufreq > statistics and aggregated into them such that you could view the normal > world vs. secure world residency of a given frequency point. This would > help because a lot of times, Linux requests freq X, but the secure world > requires freq Y (with X >= Y) and people do not really understand why > the resulting power usage is higher for instance. > > What are your thoughts on this? > I know that Viresh is going to develop patches and improve these cpufreq stats framework. Maybe he also had this 'aggregation' in mind. I will leave it him. Thank you for your feedback. Regards, Lukasz _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel