Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3664608rdg; Wed, 18 Oct 2023 02:16:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGLLAl8Por0kKLLfQ23UXn/i9eZtb1N4kjLs3Xj/KeV+CE/0W+S+3JC8wQ+uTW0HcC+YcWj X-Received: by 2002:a05:6300:8083:b0:179:f81b:12d9 with SMTP id ap3-20020a056300808300b00179f81b12d9mr3814730pzc.11.1697620577913; Wed, 18 Oct 2023 02:16:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697620577; cv=none; d=google.com; s=arc-20160816; b=tpvUlukxB583/BqmRCcEYySuyuZsY2no+4uFybLQm7FMNA/8iTZeJ5j8XTPup6d4tj nJ9/c0/jSWXCKy+TDUA0w0kgarDadsTNGWDtxwEdpUPkpJraKClrEPAUw37p5fvwok+q vaRyjFPHGKxvE0WZfny2v5J5DzdWXwDc9HrRGAMkuYaByjVrV20Ctlv5KnsWXu0Vu5iZ 4b1LNvvYGg3stwJn5QUZQ32uujGSMKgcHtdBl1fJ7aqPR9JNjd9/kZsYrwZ13ZMTjV2o +zLYB/s3YMbrrDqYXiIkG3GIhqGIUds9HF+iCvq3jMzIwBNCdtvKr/R4ioVwiSto3wMn Oglg== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=oT6f409LKuT0386W91gc1vumapKQB/9rFmIyn5xvF1U=; fh=jb/wrWFIEbZsy7pkR8zm4YKpA4Ae+8BtND4d2IhSrrg=; b=rlo3SSLnNuljnHv8KFr0leJElXLafpvAvAD3P1IpcggIE+dSgByOpHgTaUUrr3xhRL GYz6O46CyKLLBztvejakHL8d03f9yTFsItWqxWRCf9R1Sjqv5u4FgCJrT20Gji/KlVt1 UWv0c5GYrXjURG7G6wponSOkXL+av22bLyuelmv13QevuIqiVra3mHJFN3zv7p4l2wUd 2VVdBo1fix69m2BLISY0OXHvleY8LwFlggEGQuRE2j/2eqcROVG1azeBzGlWAdPfzxVt DnMP6+wD0xn+6CUZp5FxyVCaOfQkkncmPQVfubayx+re9vzgYpoeh9T7CQaJRFQbWe+C im7Q== 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 w14-20020a170902d70e00b001c9e75f87edsi3505524ply.152.2023.10.18.02.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 02:16:17 -0700 (PDT) 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 40BE28083B01; Wed, 18 Oct 2023 02:15:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229635AbjJRJPk (ORCPT + 99 others); Wed, 18 Oct 2023 05:15:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbjJRJPj (ORCPT ); Wed, 18 Oct 2023 05:15:39 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 405F0F9; Wed, 18 Oct 2023 02:15:37 -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 DC89F2F4; Wed, 18 Oct 2023 02:16:17 -0700 (PDT) Received: from [10.57.81.189] (unknown [10.57.81.189]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6462B3F64C; Wed, 18 Oct 2023 02:15:32 -0700 (PDT) Message-ID: Date: Wed, 18 Oct 2023 10:16:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/6] energy_model: use a fixed reference frequency To: Vincent Guittot Cc: dietmar.eggemann@arm.com, bristot@redhat.com, aou@eecs.berkeley.edu, palmer@dabbelt.com, paul.walmsley@sifive.com, conor.dooley@microchip.com, rostedt@goodmis.org, juri.lelli@redhat.com, viresh.kumar@linaro.org, suagrfillet@gmail.com, linux-pm@vger.kernel.org, ionela.voinescu@arm.com, vschneid@redhat.com, ajones@ventanamicro.com, catalin.marinas@arm.com, linux@armlinux.org.uk, linux-riscv@lists.infradead.org, pierre.gondois@arm.com, lftan@kernel.org, linux-kernel@vger.kernel.org, bsegall@google.com, mingo@redhat.com, rafael@kernel.org, linux-arm-kernel@lists.infradead.org, peterz@infradead.org, gregkh@linuxfoundation.org, mgorman@suse.de, will@kernel.org, sudeep.holla@arm.com References: <20231009103621.374412-1-vincent.guittot@linaro.org> <20231009103621.374412-6-vincent.guittot@linaro.org> Content-Language: en-US From: Lukasz Luba In-Reply-To: <20231009103621.374412-6-vincent.guittot@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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, 18 Oct 2023 02:15:54 -0700 (PDT) Hi Vincent, On 10/9/23 11:36, Vincent Guittot wrote: > The last item of a performance domain is not always the performance point > that has been used to compute CPU's capacity. This can lead to different > target frequency compared with other part of the system like schedutil and > would result in wrong energy estimation. > > A new arch_scale_freq_ref() is available to return a fixed and coherent > frequency reference that can be used when computing the CPU's frequency > for an level of utilization. Use this function to get this reference > frequency. > > Energy model is never used without defining arch_scale_freq_ref() but > can be compiled. Define a default arch_scale_freq_ref() returning 0 > in such case. > > Signed-off-by: Vincent Guittot > --- > include/linux/energy_model.h | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > LGTM, taking into account the patch 2/6 that we don't include any boost freq (so no changes w.r.t. current EAS situation) Reviewed-by: Lukasz Luba