Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5251444rdb; Wed, 13 Dec 2023 03:37:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHi69BMi4ODA4wfbTt5LQikjFyu6WRIHNXfn2MhhSbB8Vogn6UjyEd6dRBgB7Q+rlKB6QyU X-Received: by 2002:a05:6e02:1487:b0:35f:71ef:7058 with SMTP id n7-20020a056e02148700b0035f71ef7058mr1688987ilk.3.1702467439889; Wed, 13 Dec 2023 03:37:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702467439; cv=none; d=google.com; s=arc-20160816; b=f6v3ifC2SoP7DkVzTkciUPYzq3aJs9qW0988amyTGKkUN8s8cCYdFD50ACvI6K1ZDq 0Wvbv4s8WlgavlNhoRW03vxo1vs2O7eeQkYETo6MGu4FHLKIGp7gs51wqjzc8VvG42Wt NWnfMbwX+3ROZKlFoVrgVpCu9mPvBcgRPfF1WwuO334f/jGlsJ5pEUnSQU8z6FhA9QE5 nGuaNdXYjDzuVbdyHFHZuvT+g3eaWg6v0EiNj94cytmL7PsN+3jxD5TvaySk42AE8EIg IYpsnEG7A8cos10AGePaw4d13VL+ijJaj12aIlQ3VvLt5Vc498qBOD3hdcUKL67h7TIl KzBQ== 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=psvj1DaceSs4XpkrpFZp+ZA+YhU9ieUHrJG0cDRVPiI=; fh=0+g2ASuH3wKxwXg0VU9nhrPFh4JLkt9DGXv8LHoxxWY=; b=ZVVPRT7xoO+1LYtUCm7EgdbzQBvPZIPWI1t7saK0n3HGlqk1AvJxiZuD/4iX4fX4qh vVjm/9ImQONzAD631br6EPlxPFxDDGnuls9+nkou370tTMr/ay1V2IaKoG3s9cuHZSTw 3daZd1Fm5sM0sJppk8eOxkD92hsGh+QbnqYQaACPYLR9QROycJOAj0cLRBCF+b/vqFUA 3Ik53Oer1Tr9lKDr6JuoSC/Hi5pF+A+7aPxCFbDnjOUmlizBLaTRA70UqimhiZJPajvw Q0Q2MaRfyMIbVQzir7etRl2R4N140d1UE+MwAuxbmGeFZ3vHTr89fyiS5bJcMYdY1j+I QhWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id by18-20020a056a02059200b005adba954597si9536440pgb.504.2023.12.13.03.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:37:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id CE26E80B950D; Wed, 13 Dec 2023 03:37:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378115AbjLMLgs (ORCPT + 99 others); Wed, 13 Dec 2023 06:36:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235169AbjLMLgg (ORCPT ); Wed, 13 Dec 2023 06:36:36 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DD3DC26A1; Wed, 13 Dec 2023 03:34:18 -0800 (PST) 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 DFF58C15; Wed, 13 Dec 2023 03:35:03 -0800 (PST) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CBA133F738; Wed, 13 Dec 2023 03:34:15 -0800 (PST) Message-ID: <0640a9bf-b864-45ef-ab39-14b0e85ff9ad@arm.com> Date: Wed, 13 Dec 2023 12:34:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 00/23] Introduce runtime modifiable Energy Model Content-Language: en-US To: Lukasz Luba Cc: rui.zhang@intel.com, amit.kucheria@verdurent.com, linux-pm@vger.kernel.org, amit.kachhap@gmail.com, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, len.brown@intel.com, pavel@ucw.cz, mhiramat@kernel.org, qyousef@layalina.io, wvw@google.com, linux-kernel@vger.kernel.org, rafael@kernel.org References: <20231129110853.94344-1-lukasz.luba@arm.com> From: Dietmar Eggemann In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 13 Dec 2023 03:37:17 -0800 (PST) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email On 13/12/2023 10:23, Lukasz Luba wrote: > Hi Dietmar, > > Thank you for the review, I will go one-by-one to respond > your comments in patches as well. First comments are below. > > On 12/12/23 18:48, Dietmar Eggemann wrote: >> On 29/11/2023 12:08, Lukasz Luba wrote: [...] >>> Changelog: >>> v5: >>> - removed 2 tables design >>> - have only one table (runtime_table) used also in thermal (Wei, Rafael) >> >> Until v4 you had 2 EM's, the static and the modifiable (runtime). Now in >> v5 this changed to only have one, the modifiable. IMHO it would be >> better to change the existing table to be modifiable rather than staring >> with two EM's and then removing the static one. I assume you end up with >> way less code changes and the patch-set will become easier to digest for >> reviewers. > > The patches are structured in this way following Daniel's recommendation > I got when I was adding similar big changes to EM in 2020 (support all > devices in kernel). The approach is as follows: > 0. Do some basic clean-up/refactoring if needed for a new feature, to >    re-use some code if possible in future > 1. Introduce new feature next to the existing one > 2. Add API and all needed infrastructure (structures, fields) for >    drivers > 3. Re-wire the existing drivers/frameworks to the new feature via new >    API; ideally keep 1 patch per driver so the maintainer can easily >    grasp the changes and ACK it, because it will go via different tree >    (Rafael's tree); in case of some code clash in the driver's code >    during merge - it will be a single driver so easier to handle > 4. when all drivers and frameworks are wired up with the new feature >    remove the old feature (structures, fields, APIs, etc) > 5. Update the documentation with new latest state of desing > > In this approach the patches are less convoluted. Because if I remove > the old feature and add new in a single patch (e.g. the main structure) > that patch will have to modify all drivers to still compile. It > would be a big messy patch for this re-design. > > I can see in some later comment from Rafael that he is OK with current > patch set structure. OK, in case Rafael and Daniel prefer this, then it's fine. I just find it weird that we now have 70 struct em_perf_domain { 71 struct em_perf_table __rcu *runtime_table; ^^^^^^^^^^^^^ as the only EM table.