Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp510090imn; Tue, 26 Jul 2022 01:48:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u4jkw23xwWwDqW6z+XOgnrTequUWHX4dgiOKp05tj8yDfKjZbvz+2/eVuOtBU5xWhmw8ag X-Received: by 2002:a05:6402:d0a:b0:437:f9a1:8493 with SMTP id eb10-20020a0564020d0a00b00437f9a18493mr17397899edb.226.1658825326836; Tue, 26 Jul 2022 01:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658825326; cv=none; d=google.com; s=arc-20160816; b=f07FiE4weCao6DzbrPFbLGH/Gnt13899/UvSD2jQp3rGLlP/AT6C9ju6jC89RdMIZa 8d5YwgPaXstHKo0fC3QkZ8xeA8jHjd0VXb/sL6rVelWrmL1qM2ivzNGPeOTfu0BtoJef osUDC2uOpDEIZMiuo7VV0mGbnksyLprDGn9MjuY/c7Cs4oYOqWWyOkYP2mRjg6NOjW7A cQvlwJdPCkrc0htWGbINDjhDBg829Qv9rPgyy+TpcgslAFK0dDg4hWMKMW3AYMjPxSfx 81Wusk12XfsTTEIhijmGmbuMOuK91VtEjSmbEd4usoN/n4aXywV6GzSLAN1Ax5rVXvwA Oa8w== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=RSowXuMwuzVOL/DXioa4E9AszUrfXLd1nwPQ7DE9Zwk=; b=yxEuSnYBkXd3d/xzjytF/q0zHX9p9cdfLVtg3bCbZAk62OS4riUznhyHTCHnAwNvj0 Ns/pnfaCb6WjUMcXUzA4qggXCEera9T/EhAw3kA2c1AVvwRmWTAbqrslOwDqvTiAGdq9 ex+ZiexZkAVOr8iskreaiI8ag/09DJSE6nQeIOM52rxNIKf30GmFXaQ7ym+lxCdE2Jfx 8jpo9DeDXHQyCZNFiW2JC3AeopoJX86fEKMDznK11gOTxhOASLkRbi2xxkL0oeyiZs/P uqtzucCsorcy8gra4I2iTbszTvnrKDCmmjexNuLFrqNNCwmqVaMzXKCUkx3K2ZEXOvWP w8vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a170906944b00b0072aef5bb6fesi1295073ejx.183.2022.07.26.01.48.20; Tue, 26 Jul 2022 01:48:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238080AbiGZI0t (ORCPT + 99 others); Tue, 26 Jul 2022 04:26:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232010AbiGZI0s (ORCPT ); Tue, 26 Jul 2022 04:26:48 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 18E091A82E; Tue, 26 Jul 2022 01:26:47 -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 759441FB; Tue, 26 Jul 2022 01:26:47 -0700 (PDT) Received: from [10.57.13.197] (unknown [10.57.13.197]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A0FA33F73B; Tue, 26 Jul 2022 01:26:45 -0700 (PDT) Message-ID: Date: Tue, 26 Jul 2022 09:26:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] cpufreq: schedutil: Move max CPU capacity to sugov_policy Content-Language: en-US From: Lukasz Luba To: "Rafael J. Wysocki" Cc: Viresh Kumar , Linux Kernel Mailing List , Linux PM , Dietmar Eggemann , Vincent Guittot References: <20220711124229.16516-1-lukasz.luba@arm.com> <1198724e-d94f-0b7c-9c4a-90595f8426d2@arm.com> <837b387a-b29d-2122-efb0-881b24dd2725@arm.com> In-Reply-To: <837b387a-b29d-2122-efb0-881b24dd2725@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE 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 Hi Rafael, On 7/25/22 09:07, Lukasz Luba wrote: > Hi Rafael, > > On 7/15/22 18:29, Rafael J. Wysocki wrote: >> On Fri, Jul 15, 2022 at 1:47 PM Lukasz Luba wrote: >>> >>> >>> >>> On 7/15/22 12:44, Rafael J. Wysocki wrote: >>>> On Fri, Jul 15, 2022 at 10:47 AM Lukasz Luba >>>> wrote: >>>>> >>>>> Hi Rafael, >>>>> >>>>> gentle ping. >>>>> >>>>> On 7/11/22 13:42, Lukasz Luba wrote: >>>>>> There is no need to keep the max CPU capacity in the per_cpu >>>>>> instance. >>>>>> Furthermore, there is no need to check and update that variable >>>>>> (sg_cpu->max) everytime in the frequency change request, which is >>>>>> part >>>>>> of hot path. Instead use struct sugov_policy to store that >>>>>> information. >>>>>> Initialize the max CPU capacity during the setup and start callback. >>>>>> We can do that since all CPUs in the same frequency domain have >>>>>> the same >>>>>> max capacity (capacity setup and thermal pressure are based on that). >>>>>> >>>>>> Signed-off-by: Lukasz Luba >>>>>> --- >>>>>>     kernel/sched/cpufreq_schedutil.c | 30 >>>>>> +++++++++++++++--------------- >>>>>>     1 file changed, 15 insertions(+), 15 deletions(-) >>>>> >>>>> The patch got Ack from Viresh. >>>>> Could you take it? >>>> >>>> Yes, it's there in my queue.  Same for the EM changes. >>> >>> Thank you Rafael! >> >> Well, the patch doesn't apply on top of 5.19-rc6, because >> sugov_get_util() is somewhat different. >> >> Please rebase it and resend. > > My apologies for the delay, I was on holidays. > > I'll do that today and resend it. > I have found the reason why it doesn't apply on your tree. I have used next-20220711 to base this work on. It contains Peter's branch sched/core, where there is this Dietmar's patch: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=sched/core&id=bb4479994945e9170534389a7762eb56149320ac That causes the issue. I thing it might collide when I re-base my patch on top of 5.19-rc6 and you apply it into pm tree... What do you think about this?