Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3269283rdb; Thu, 16 Nov 2023 05:19:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKaGH27kk+LADhy0cJ9f+GMud7CZe6ADhytCuqE6PgBZBitzDs0OR+n3NaolhZDrqt6/NZ X-Received: by 2002:a05:6830:344c:b0:6d6:4d8f:56d6 with SMTP id b12-20020a056830344c00b006d64d8f56d6mr9183193otu.13.1700140754491; Thu, 16 Nov 2023 05:19:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700140754; cv=none; d=google.com; s=arc-20160816; b=I/gW6D5x8CtJpkSM4fkb04CZQQSbFJRf2NyaH7H4m0QmsMrMbBit1WEKJkyDWDd+Nc u9DSYGBhUtDNNfDJOHrTSk2gacq+hXa2pc6MifGmSsTE0FbCJbrN7DotNO+JdUpjdhS+ cMGNVO8yHJL2GuZ//P/pjmDgAb1GHTHlDAkS7ij1ZOoS6INaiK7q5Q4m+TQtmosvRoIf QbH/9LUV8L76U8kacjnyMsrqiAaqTJr++DyCdLbh5JEO54v7tkr1e8I50Mzb2TGPkH2y pCYLJtYvCfLeKzKSmLCK9tqWVWc3/b1j8F7L431QGEc48rAi+vxmywP5onPTBAnuc+wu 1uVA== 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=bxJPp61EUt9rukYvfQXDZSsvQ8ZpFuglolHURhWwgO8=; fh=j/odTmMpCP8HOjvza24YdjqyeHdznyHrGA7gUADHKBA=; b=tPtScHFMiqbmi7CvUhBD6io87h5nunJIbNn3WdYxt9d7Ykj5pk8mdAXpuese9U2LHu Ss0VWeTK0WJ01PrboyftRFeFG8nzMb8EWAQsxeByR+iIY0QJWTb3m5LA3Uvi8Rf60osz ZvE4/gv1V3yDQ6/OIxvrv1zcX1LNXB2OTX4w6SCWZaUzkuwanjGqGrOhcdmNeFMbfM4U aIitp9DzH3sX7TKz/OnHjtxaKQKDb1pUOuFy0np3RK0WH3wQGw0MJ0/TIIvqfMz0yoVB d//Aej2BiEqJrQKY4xTafoey9NH66UJWHi3EySCqJkqBonWJP0N20bSlwYoDdWb4cExs 4bPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q21-20020a656a95000000b005b966a6960csi1461205pgu.786.2023.11.16.05.19.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 05:19:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id D3C8D8206D67; Thu, 16 Nov 2023 05:19:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345194AbjKPNTL (ORCPT + 99 others); Thu, 16 Nov 2023 08:19:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230371AbjKPNTI (ORCPT ); Thu, 16 Nov 2023 08:19:08 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D78C81A5; Thu, 16 Nov 2023 05:19:05 -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 AA3591595; Thu, 16 Nov 2023 05:19:51 -0800 (PST) Received: from [10.57.3.57] (unknown [10.57.3.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CCA963F73F; Thu, 16 Nov 2023 05:19:02 -0800 (PST) Message-ID: <90c9d5b5-fbb1-437d-a961-efd0da61d6f7@arm.com> Date: Thu, 16 Nov 2023 13:19:59 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/2] sched/schedutil: Rework performance estimation Content-Language: en-US To: Vincent Guittot Cc: wyes.karny@amd.com, beata.michalska@arm.com, juri.lelli@redhat.com, mingo@redhat.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, viresh.kumar@linaro.org, rafael@kernel.org, vschneid@redhat.com, bristot@redhat.com, mgorman@suse.de, bsegall@google.com, rostedt@goodmis.org, dietmar.eggemann@arm.com, peterz@infradead.org, qyousef@layalina.io References: <20231103131821.1176294-1-vincent.guittot@linaro.org> <20231103131821.1176294-2-vincent.guittot@linaro.org> From: Lukasz Luba In-Reply-To: <20231103131821.1176294-2-vincent.guittot@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 16 Nov 2023 05:19:13 -0800 (PST) Hi Vincent, On 11/3/23 13:18, Vincent Guittot wrote: > The current method to take into account uclamp hints when estimating the > target frequency can end into situation where the selected target > frequency is finally higher than uclamp hints whereas there are no real > needs. Such cases mainly happen because we are currently mixing the > traditional scheduler utilization signal with the uclamp performance > hints. By adding these 2 metrics, we loose an important information when > it comes to select the target frequency and we have to make some > assumptions which can't fit all cases. > > Rework the interface between the scheduler and schedutil governor in order > to propagate all information down to the cpufreq governor. > > effective_cpu_util() interface changes and now returns the actual > utilization of the CPU with 2 optional inputs: > - The minimum performance for this CPU; typically the capacity to handle > the deadline task and the interrupt pressure. But also uclamp_min > request when available. > - The maximum targeting performance for this CPU which reflects the > maximum level that we would like to not exceed. By default it will be > the CPU capacity but can be reduced because of some performance hints > set with uclamp. The value can be lower than actual utilization and/or > min performance level. > > A new sugov_effective_cpu_perf() interface is also available to compute > the final performance level that is targeted for the CPU after applying > some cpufreq headroom and taking into account all inputs. > > With these 2 functions, schedutil is now able to decide when it must go > above uclamp hints. It now also have a generic way to get the min > perfromance level. > > The dependency between energy model and cpufreq governor and its headroom > policy doesn't exist anymore. > > eenv_pd_max_util asks schedutil for the targeted performance after > applying the impact of the waking task. > > Signed-off-by: Vincent Guittot Just in case you are waiting for me. The patch should be OK as you explained to me in v2. I'm not able to test it right now on my pixel6 downstream-tracking-mainline kernel, so please go forward not waiting for me. (the pixel6 is the only platform that I have now which is normally using the uclamp). Regards, Lukasz