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, 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 193D9C433DF for ; Thu, 30 Jul 2020 09:11:56 +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 D9E7D20809 for ; Thu, 30 Jul 2020 09:11:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hYR9+dLh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9E7D20809 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-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tkieBTrHuIOSDymaiF292T29c+uCfAHgfjZzMcfd2DY=; b=hYR9+dLhWdIp0T+O4alfx34/7 DEI+g6uX+q1j+yXwXfzbiejc8pD5RVFDk6lFzHLgDAOcdRNasABeol9yg7JD12pVXcUPWl7iYCmAv shIw98shBoG88dpCdwvnWVe+dgkwpZd1ufZShLtSEfbbRKRjsgMhdKrFoXODaf5aJgnzHVsZpflJk rFjLS35BNFGks8j336toT1n4JXusYWwNf73/2ndscvL26jn2/BenDCTGTDfGvAqD91EaE5G/u1Pjc abFwXizONHtASWvnjxEfzhAoiPRwdSVd8k3irydN8NEzJUVIKyCiZMbjtEc9jvgnrxF8EsdEChmR3 rnZ+f2z3w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k14a4-0002yp-Fg; Thu, 30 Jul 2020 09:10:28 +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 1k14a2-0002yB-1K for linux-arm-kernel@lists.infradead.org; Thu, 30 Jul 2020 09:10:26 +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 A42C7D6E; Thu, 30 Jul 2020 02:10:22 -0700 (PDT) Received: from bogus (unknown [10.37.12.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 637473F792; Thu, 30 Jul 2020 02:10:20 -0700 (PDT) Date: Thu, 30 Jul 2020 10:10:14 +0100 From: Sudeep Holla To: Viresh Kumar Subject: Re: [PATCH 0/4] CPUFreq statistics retrieved by drivers Message-ID: <20200730091014.GA13158@bogus> References: <20200729151208.27737-1-lukasz.luba@arm.com> <20200730085333.qubrsv7ufqninihd@vireshk-mac-ubuntu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200730085333.qubrsv7ufqninihd@vireshk-mac-ubuntu> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200730_051026_135255_0421BC0A X-CRM114-Status: GOOD ( 29.14 ) 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: linux-pm@vger.kernel.org, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, cristian.marussi@arm.com, Sudeep Holla , Lukasz Luba , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 30, 2020 at 02:23:33PM +0530, Viresh Kumar wrote: > On 29-07-20, 16:12, Lukasz Luba wrote: > > 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. > > > > 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. > > > > The needed CPUFreq infrastructure is in patch 1/4, patch 2/4 extends > > ARM SCMI protocol layer, patches 3/4, 4/4 modify ARM SCMI CPUFreq driver. > > Are you doing this for the fast switch case or because your platform > actually runs at frequencies which may be different from what cpufreq > core has requested ? > I think so. > I am also not sure what these tables should represent, what the > cpufreq core has decided for the CPUs or the frequencies we actually > run at, as these two can be very different for example if the hardware > runs at frequencies which don't match exactly to what is there in the > freq table. I believe these are rather to show what cpufreq and its > governors are doing with the CPUs. > Exactly, I raised similar point in internal discussion and asked Lukasz to take up the same on the list. I assume it was always what cpufreq requested rather than what was delivered. So will we break the userspace ABI if we change that is the main question. > Over that I would like the userspace stats to work exactly as the way > they work right now, i.e. capture all transitions from one freq to > other, not just time-in-state. Also resetting of the stats from > userspace for example. All allocation and printing of the data must be > done from stats core, the only thing which the driver would do at the > end is updating the stats structure and nothing more. Instead of > reading all stats from the firmware, it will be much easier if you can > just get the information from the firmware whenever there is a > frequency switch and then we can update the stats the way it is done > right now. And that would be simple. > Good point, but notifications may not be lightweight. If that is no good, alternatively, I suggested to keep these firmware stats in a separate debugfs. Thoughts ? -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel