Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5273108rdb; Wed, 13 Dec 2023 04:19:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjPhjRfRsHm0Sw78VJZ0tHhWA8n/g/asX+7JC8laug6f2GsQYMisNQds3kv1JwRtOYnOFj X-Received: by 2002:a05:6e02:18c5:b0:35d:462a:afea with SMTP id s5-20020a056e0218c500b0035d462aafeamr7980127ilu.21.1702469971719; Wed, 13 Dec 2023 04:19:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702469971; cv=none; d=google.com; s=arc-20160816; b=VJfwoXyugd8t+uLL3d91kXzkqkIf41otkAEjKL3YzAsVGsq6QTqpogiz1NvC+lFg2O XBhwDxZ+4cvcOlZPiRN2VWX71BhhKxHw/9i7rheBFRdvL7As1IeKVFyX8DttWizfr2bY JxDO+7I5jP/5fjy4WP6Topnm2/MuW/Ct3E9QeycUsXbQZ4ze1QDidf9AQxi4goLQwsan 4dC4qaI40FHWWrKieEB/XvYvcHIf0H9xxWuJ2uKkwg/JpCK5iWuXsoksCwYvOEma8EZ/ XGLXP2AJKr6A+d06mAAW6fUlY2lA4L6PMI7SJBaiLSy2BWXPImoGv/RdylxeMw9nSYxT w7ww== 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=pswCZJDg9RVXRRLpwpROV9L2lGEk68nV1HBEd6WQhQM=; fh=kmfTBDBTWf0XGuPMn7P7RezkO/O64X6jnetZ2py62tM=; b=JaeRUVOMqHZK7B3Fblze5n7nCtV0u+5023SOnAW/2eOtVmjHDGFNYJKVJCUtaKpC82 U0f0QxZk6J5o0lMuj0JN5UeKiQg13qWTZZB8BhQBj9wCNnOBfhXzQ06lqaWK2ygCjDuO naYmi87kioh/aLUy+vxRXyjMMYCfeglxxJQiZwa0UqMcvc8WoF2MpZoU8xsdVzE20/PN e5WQ//0FoACDLj5cX1+Q5VbALVwDv1MGyvP8YSjSB+2WKXYRt+D5srqwGVxMj80nwlGa kxm50lU5xacn3JOoPDtPW6LSYIDG45SXKl2KaySAqkomsOB/BUgQyrRStIxDPqn96YD7 lyjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id 4-20020a631744000000b005bd2b354a42si9531057pgx.207.2023.12.13.04.19.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 04:19:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 37E8080B5A00; Wed, 13 Dec 2023 04:19:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233398AbjLMMTP (ORCPT + 99 others); Wed, 13 Dec 2023 07:19:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233401AbjLMMTO (ORCPT ); Wed, 13 Dec 2023 07:19:14 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 95844CD; Wed, 13 Dec 2023 04:19:19 -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 5F73EC15; Wed, 13 Dec 2023 04:20:05 -0800 (PST) Received: from [10.57.85.168] (unknown [10.57.85.168]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9F9123F762; Wed, 13 Dec 2023 04:19:15 -0800 (PST) Message-ID: Date: Wed, 13 Dec 2023 12:20:19 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 00/23] Introduce runtime modifiable Energy Model Content-Language: en-US To: "Rafael J. Wysocki" , Dietmar Eggemann 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 References: <20231129110853.94344-1-lukasz.luba@arm.com> <0640a9bf-b864-45ef-ab39-14b0e85ff9ad@arm.com> From: Lukasz Luba In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Wed, 13 Dec 2023 04:19:29 -0800 (PST) On 12/13/23 11:45, Rafael J. Wysocki wrote: > On Wed, Dec 13, 2023 at 12:34 PM Dietmar Eggemann > wrote: >> >> 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. > > I agree that it would be better to call it something like em_table. > OK, I'll change that. Thanks Rafael and Dietmar!