From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ED75C4167B for ; Tue, 5 Dec 2023 14:48:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345694AbjLEOr5 (ORCPT ); Tue, 5 Dec 2023 09:47:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232155AbjLEOr4 (ORCPT ); Tue, 5 Dec 2023 09:47:56 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 06CDFCA for ; Tue, 5 Dec 2023 06:48:03 -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 52A5B139F; Tue, 5 Dec 2023 06:48:49 -0800 (PST) Received: from [10.1.31.59] (e133649.arm.com [10.1.31.59]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 96F113F6C4; Tue, 5 Dec 2023 06:48:00 -0800 (PST) Message-ID: <2677b01d-899d-4f64-b17c-85033386a4d3@arm.com> Date: Tue, 5 Dec 2023 14:47:58 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 2/6] sched/uclamp: Simulate PELT decay in util_avg_uclamp Content-Language: en-US To: Vincent Guittot Cc: Ingo Molnar , Peter Zijlstra , Dietmar Eggemann , Juri Lelli , Qais Yousef , Morten Rasmussen , Lukasz Luba , Christian Loehle , linux-kernel@vger.kernel.org References: From: Hongyan Xia In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/12/2023 16:07, Vincent Guittot wrote: > On Wed, 4 Oct 2023 at 11:05, Hongyan Xia wrote: >> >> From: Hongyan Xia >> >> Because util_avg_uclamp is not directly managed by PELT, it lacks the >> nice property of slowly decaying to a lower value, resulting in >> performance degredation due to premature frequency drops. > > That a very good reason for not doing this This is not much different from util_guest and the "additive uclamp" proposal in LPC 2023. The major difference is that I introduce a new signal right beside util_avg (which then needs to have PELT behavior) and they introduce signals in a way like util_est. Now that I think about it, maybe my way is indeed too drastic, and maybe the util_est way is better. >> >> Add functions to decay root cfs utilization and tasks that are not on >> the rq. This way, we get the benefits of PELT while still maintaining >> uclamp. The rules are simple: > > Nack. This just highlights that you are mixing different things and > then trying to make it work. > > Please keep PELT out of uclamp_min/max Well, like in my previous comment I think PELT is already a mixed signal anyway, and treating it like it's not mixed with uclamp has already shown many problems which need corner case code like 0 spare capacity and uclamp filtering to make things work properly, and the code to fix uclamp is still growing. I will see if I can rework this series in a util_est style, and will probably converge with the other two proposals, but fundamentally the idea is that we don't have a pure PELT signal anyway. Achieving a PELT value of X doesn't mean much if we don't know under what uclamp values was it achieved, and having a clamped(X) on the side can be a very good hint. Hongyan