Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp332891rdb; Tue, 5 Dec 2023 06:48:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHPfYswdvOBsli9rdBaWQDER6OplUcy0UEBUjalOS6X2gxS4aNYc8slhZ4FkjlyOTkABE8z X-Received: by 2002:a17:90a:f289:b0:286:6cc0:caea with SMTP id fs9-20020a17090af28900b002866cc0caeamr1230306pjb.97.1701787688245; Tue, 05 Dec 2023 06:48:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701787688; cv=none; d=google.com; s=arc-20160816; b=d7FHtOSwkL+AtL/iS8Vr4qAG3j0TxZP4SRHqQN2nPAest9VqHaGSNF7/ATowK0qz+I +BHYTajB9sSXkBUBe17vzg8EKzg4BK9rw/emQdUdjBg4skcpDCzEQCh+uEVzQ2+pyAbu YpDdX6ggYYAXEG8xpZqI4OtV4sd2+TXMgY6+Z3TM3ZkiQXOz1t5ZiJUsh/Y2a3/YKDuk aRbBCePukZYErKlT3+F+X2anwhoZKfVew1av/bEmQMab329GF3WvDUhn+JGZgEsassSP +oc6162DuF6rclpRTMUkr8mCP8zqYu3AsvD/QA+OD5J7bw07HpW59QmB4z/RSNfmoQps HNXw== 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=m63zchlWsBTuVudiyKdzhXj0gnHzljJBc0kcoknlFXg=; fh=/quC9E1XMeRYzMfumQCFp9np2RGMsNO0f5F/AdsYNfY=; b=EVHF1mT4RgfRPdk9UseMOp61FusYH3ZsJwFS4EBLaOtIl+4MrR6GGOsLlaGUXzqhJ6 hxwm9r1ux6We7/zkZ7RqkGdh4Y8HwX+jed1ACEnTgQD+9AJ8BikEi2qWVGyZBdmTvRAS TeR6D1Ld2zyNU2ZiUjNLQCzgD8VFW2ZbL7W7OOJjXzzL7uCH2ygm2N4vzumdai4+YzQy ZxkGKTXtrHTfcdkJW1S8JtO8mi9kUjqwpRlCxF9UM77AeRgzhyaSvf82ZnNXYc2gfe5g 6AqzFgZ4FME3xUZcRmNbi9KJ08BGl/8mVC39G/Eq+7A1tK6F00zWV+RRhaAYfLumBnZf CRCA== 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 nh9-20020a17090b364900b002865ae767cesi7416594pjb.172.2023.12.05.06.48.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:48:08 -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 28A3880BC50D; Tue, 5 Dec 2023 06:48:06 -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 S1345682AbjLEOr5 (ORCPT + 99 others); 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 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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]); Tue, 05 Dec 2023 06:48:07 -0800 (PST) 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