Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp862696rwd; Wed, 7 Jun 2023 07:53:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Xo0MtR15nL0XZCdI/S+2vYyAwkw0p+5erPZNMhnChrPJvcBmxolkzJ+r+35PxMLG/g8Qi X-Received: by 2002:a17:903:1d1:b0:1af:eea0:4f5b with SMTP id e17-20020a17090301d100b001afeea04f5bmr6921249plh.2.1686149600189; Wed, 07 Jun 2023 07:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686149600; cv=none; d=google.com; s=arc-20160816; b=cxelCHkWclFkZvwWvi6CQw+NNKTQ5/MaoeHgme2I5+a3yGYetYG85WOezwZYaKVcts gRHby0v33xv9YrLhWmuNLZp+4Ukjk/PAJHjOJw/T6r/zynFBSLbaZQSwUeyVBFzXhXM6 LCJvmN0Wx7NTWjPsXzaYjpy2QE7FXOR9zEFyxeKMX2lcYiK7K15k4r0Yh1vTVp36N6ns ILaVxqFc0fxHaMRNEIu2uODaPTiVSmE6jN+TjHA2eSvzl98D9d/Vf7ILWT/zMAh9E2vS F/wrUwlbWePKkJXSjyJVHM/CZNH1BipIfaHf09GCXurd/mYGPnvysfvgxvCjj5PRbhaj 4nfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=4AaBK0l42cbShH+VxrYPwD8ifjynv4DYuiINJu/VrVg=; b=M1rJKgnwx5kegQ5d1VPbkVMvLG4MbxcWMHVH3wlZhHlXIXRmlBo08cihuh07/4+F7J f3Oti3K/3hcOPXsTCBeUiM6r1L0YbR5wm6dFUlLf82/CLZnYpNMajkn3EvwqdD/ZyXol 7lXMj+ZKJvgrp0O5WgRA2Vv3wF1K8JxKJfZMgxIcgpadFjpy1SEuwJUxmCNoX5TXo4V6 5gnus3j2W/lXGFUUjkGtBBYrKIcHp+sr4wtwfI7dBHGH8T0AfToPh9PrH8Ed2Dc3Nx64 /p4Cr1LWMZWoDfDFKU19fFP+zczQdbB07MeZcgx8ZRNt62JHS1LOBjtUrAmyQCYIsgGE Mhxg== 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 h18-20020a170902f7d200b001aedad06360si8842743plw.255.2023.06.07.07.53.04; Wed, 07 Jun 2023 07:53:20 -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 S241168AbjFGOnk (ORCPT + 99 others); Wed, 7 Jun 2023 10:43:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235216AbjFGOni (ORCPT ); Wed, 7 Jun 2023 10:43:38 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B14B21BD2; Wed, 7 Jun 2023 07:43:28 -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 DC1EE2F4; Wed, 7 Jun 2023 07:44:13 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E78683F587; Wed, 7 Jun 2023 07:43:26 -0700 (PDT) Date: Wed, 7 Jun 2023 15:43:24 +0100 From: Cristian Marussi To: Ulf Hansson Cc: Sudeep Holla , Viresh Kumar , Nishanth Menon , Stephen Boyd , Nikunj Kela , Prasad Sodagudi , Alexandre Torgue , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/16] arm_scmi/opp/dvfs: Add generic performance scaling support Message-ID: References: <20230607124628.157465-1-ulf.hansson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230607124628.157465-1-ulf.hansson@linaro.org> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On Wed, Jun 07, 2023 at 02:46:12PM +0200, Ulf Hansson wrote: > The current SCMI performance scaling support is limited to cpufreq. This series > extends the support, so it can be used for all kind of devices and not only for > CPUs. > > The changes are spread over a couple of different subsystems, although the > changes that affects the other subsystems than the arm_scmi directory are > mostly smaller. The series is based upon v6.4-rc5. That said, let's figure out > on how to best move forward with this. I am of course happy to help in any way. > > Note that, so far this is only be tested on the Qemu virt platform with Optee > running an SCMI server. If you want some more details about my test setup, I am > certainly open to share that with you! > > Looking forward to get your feedback! > Hi Ulf, thanks for this first of all. I'll have a look at this properly in the next weeks, in the meantime just a small minor remark after having had a quick look. You expose a few new perf_ops to fit your needs and in fact PERF was still not exposing those data for (apparent) lack of users needing those. (and/or historical reason I think) My concern is that this would lead to a growing number of ops as soon as more data will be needed by future users; indeed other protocols do expose more data but use a different approach: instead of custom ops they let the user access a common static info structure like + int (*num_domains_get)(const struct scmi_protocol_handle *ph); + const struct scmi_perf_dom_info __must_check *(*info_get) + (const struct scmi_protocol_handle *ph, u32 domain); and expose the related common info struct in scmi_protocol.h too. Another reason to stick to this aproach would be consistency with other protos (even though I think PERF is not the only lacking info_get) Now, since really there was already a hidden user for this perf data (that would be me :P ... in terms of an unpublished SCMI test-driver), I happen to have a tested patch that just expose those 2 above ops and exports scmi_perf_dom_info and related structures to scmi_protocol.h If you (and Sudeep) agree with this approach of limiting the number of exposed ops in favour of sharing upfront some static info data, I can quickly cleanup and post this patch for you to pick it up in your next iteration. (really I'd have more conversion of this kind also for other remaining protos but these are unrelated to your series and I'd post it later) Thanks, Cristian