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 6106BC433DF for ; Tue, 4 Aug 2020 10:40:42 +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 3DD7920656 for ; Tue, 4 Aug 2020 10:40:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CXVCnU/w"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oN3IV5bZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DD7920656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=xSoRjrufqq8bTF6Vq6dtInwhLWziGGKprpRP5r5qEkk=; b=CXVCnU/wzB/zeVuWOu/N98AZO qc18gQ4CnFDwn6s+zIGv9I7HvCZrmiNkAue7EhgmngUYgPuLhCCsPvONZDYJcw9ku8j3Dl/ROnISj Lp5BFk376kkKhcTvmFJeMBma0YNfk4YLkO1TcW+1zDkjCZo4VZbLcpP8Z/vHl50ix1E3fvWlEoZav 6sfwLQmDfeZwG9b1k184iwGWL3dnR9+teNKOb8s2L+LtT8sUj7ZHPz0nlHAhAWrvxVjtxdHkFLVRA Eq4/VExvnydmLw7t/79iyhAFIhx5iicEHUZ1cmJQr8hVnxzJaorCUUHCd+BsyqNu/WiDv6xFQVysV aIcvR2pfw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2uLa-00006h-SA; Tue, 04 Aug 2020 10:39:06 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2uLX-000062-8A for linux-arm-kernel@lists.infradead.org; Tue, 04 Aug 2020 10:39:04 +0000 Received: by mail-pj1-x1041.google.com with SMTP id l60so1737113pjb.3 for ; Tue, 04 Aug 2020 03:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BNGGP8nI26QQvsEtdjfefrmhKzpQ5Kf8DvxYjmO6N1s=; b=oN3IV5bZB9RdAEY0bOaOOp2T+d5/UxbxRkvHrrDySh0FyMAgmapRgFPBrbmz3kBrl3 RjLXUUB09TekcAgaiuL7IhpYURnG5+ogt0T5d55cO5B3bxRQ+Haq0vcnjmA0cA1Du3EC VAiRThtJOmBJbcflkdN5ujxsX6OKjoc1VsD/eZs5Dm0OLV0C/CoprrYF94u6PP/uXQxN +Y6YRe98pTIl6+gjhgYyKUw28/HgNrZKLziwHC6jpFzjn9v73DL79pxYkSAbtt7tDpj3 x+OY5KwvKlj4foIyD9AFeM0I/oqdPMkhDo8BHerWfZbrIRxGlMBNlJfuEM5nr9z/aCed HJSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=BNGGP8nI26QQvsEtdjfefrmhKzpQ5Kf8DvxYjmO6N1s=; b=V94Sg2yYYQdWfkP6/e4H9PvJxFrM2Re8HCjENKF6tr2J+7ep2OXpEkEQh4UklctlJ8 tRJloKxhjwljZWB/zHSY7nz6M/KFUmEvrhDLhH3hJwMRR7mSU1422EIB+EjNO13cyxW/ Fakt0t1wiXu4FUwJ2mYh0ixa1YvmfA64Zdl/J8Gb8H+Evi8Moqh5uTaYl3mjcMjtVsDB fmty4ln/fi6gwRjrEc+4hjlENlYLr47wTCmqYLQwuWH8R23cfU8a4uZUdVaugRA6yYXs q0DJV9FE4PYe+Rkmic4wkDOz0YTSE7axmyDuMz6NmaEzPsKa98m5n/NNGhVu426R97mx UAfw== X-Gm-Message-State: AOAM532GnjNiwzKAmItgzg/+W+pL6yhHnDb8zISp3eDdOsLAqWxwlvYx w4vrJyr+NGM3uvAWOZaAjMbJpA== X-Google-Smtp-Source: ABdhPJyScsX2xR+pwN0T13dS1iijdQ58el2pg9EUEaeim5L9Peixs0Tx8EVJ5/wuCjT7xdedYbcYBg== X-Received: by 2002:a17:902:b20e:: with SMTP id t14mr851080plr.58.1596537540953; Tue, 04 Aug 2020 03:39:00 -0700 (PDT) Received: from localhost ([122.162.173.150]) by smtp.gmail.com with ESMTPSA id t19sm23230670pfq.179.2020.08.04.03.38.59 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Aug 2020 03:38:59 -0700 (PDT) Date: Tue, 4 Aug 2020 16:08:57 +0530 From: Viresh Kumar To: Lukasz Luba Subject: Re: [PATCH 0/4] CPUFreq statistics retrieved by drivers Message-ID: <20200804103857.mxgkmt6qmmzejuzb@vireshk-mac-ubuntu> References: <20200729151208.27737-1-lukasz.luba@arm.com> <20200730085333.qubrsv7ufqninihd@vireshk-mac-ubuntu> <20200730091014.GA13158@bogus> <3b3a56e9-29ec-958f-fb3b-c689a9389d2f@arm.com> <20200804053502.35d3x3vnb3mggtqs@vireshk-mac-ubuntu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200804_063903_562273_29371AF4 X-CRM114-Status: GOOD ( 26.39 ) 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, linux-arm-kernel@lists.infradead.org, Sudeep Holla , cristian.marussi@arm.com 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 04-08-20, 11:29, Lukasz Luba wrote: > On 8/4/20 6:35 AM, Viresh Kumar wrote: > > IIUC, the only concern right now is to capture stats with fast switch ? Maybe we > > can do something else in that case and brainstorm a bit.. > > Correct, the fast switch is the only concern right now and not tracked. We > could fill in that information with statistics data from firmware > with a cpufreq driver help. > > I could make the if from patch 1/4 covering narrowed case, when > fast switch is present, check for drivers stats. > Something like: > -----------8<------------------------------------------------------------ > if (policy->fast_switch_enabled) > if (policy->has_driver_stats) > return cpufreq_stats_present_driver_data(policy, buf); > else > return 0; > -------------->8---------------------------------------------------------- I don't think doing it with help of firmware is the right thing to do here then. For another platform we may not have a firmware which can help us, we need something in the opp core itself for that. Lemme see if I can do something about it. > > Why is firmware the governor here ? Aren't you talking about the simple fast > > switch case only ? > > I used a term 'governor' for the firmware because it makes the final > set for the frequency. It (FW) should respect the frequency value > set using the fast switch. I don't know how other firmware (e.g. Intel) > treats this fast switch value or if they even expose FW stats, though. For Intel I think, Linux is one of the entities that vote for deciding the frequency of the CPUs and the firmware (after taking all such factors into account) chooses a frequency by its own, which must be >= the frequency requested by Linux. > You can read about this statistics region in [1] at: > 4.5.5 Performance domain statistics shared memory region > > > > > Over that, I think this cpufreq stats information isn't parsed by any tool right > > now and tweaking it a bit won't hurt anyone (like if we start capturing things a > > bit differently). So we may not want to worry about breaking userspace ABI here, > > if what we are looking to do is the right thing to do. > > So, there is some hope... IMHO it would be better to have this cpufreq > stats in normal location, rather then in scmi debugfs. I agree. > > I am not sure what notifications are we talking about here. > > There is a notification mechanism described in the SCMI spec [1] at > 4.5.4 Notifications. > We were referring to that mechanism. Ahh, I see. All I was thinking was about the cpufreq specific notifiers :) -- viresh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel