Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp670334imw; Fri, 15 Jul 2022 10:35:00 -0700 (PDT) X-Google-Smtp-Source: AGRyM1snjIckjOkYy9cjse+6DBSznJgmgMQIGOJOzPRWWv0wXePTO1y8aBhchm5SY5vsHWW8yIKj X-Received: by 2002:a05:6871:8a9:b0:10c:29ec:d06d with SMTP id r41-20020a05687108a900b0010c29ecd06dmr11081121oaq.204.1657906500723; Fri, 15 Jul 2022 10:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657906500; cv=none; d=google.com; s=arc-20160816; b=geuGVMU5P8QXisxE1UEeISzhiAjGrMcFBE7AT98k1ZbAdx9cHXZLiK8fZUJSL2FkdZ ub3nu9pg3GX/TAPmZnPtifjhEjs6rQQbPAcY5LLLD9QotqKGHpRWSQhh88mMvIX5t+CV 3vxENsu5uc0HB4HfJLh4m8VaD5QyHRu89Kjbz2WmuoSUdM4E+qQzzgG57NPO0RfRWkMp f7LQ0YPG0W64By1kK/hsdJa93iKCdzOaa3qHOex8Oz1SLxgeoCzR1QcyCTJhQZtBhWP9 Zm6PzaR4kToNkFk7xAH7H1aCGOAiyMX0n7UN1DF3sBUYrrxmgMgYUwygCl//aWbBAa2E 8mbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=y3B/xuKwwDaDPj70H09iMM0q55vMJN+NwGOuzYtaHOE=; b=EyrkghfhLw/D23JwK1B/G7EuyLrbGX1tSFbqHuyyrkg7LOLncrU80cy4oIw0t/+KxR rHM2h8Bqy/9OS27arpGl+aQkSnnR5O/wfiMPn9UQQGWRP9fna2wL+Z0JYyujjRaAmHXH V6wAlJV6K5x7uMXiOB/DtxP48n30ESycnPgQFGwPshBT9KHolBRGeS/jPkWjmpTcyFO0 Ei/vwtf4zqZKlTkX2YOwcbGQZuirxmVOv42YuOpbzPK9y1PL4d3Ka1SalMKOcpdbe7Dq LMZGxbRwzqRWvW6quMISeGGlSsRKReCQcUbSnucVbDcU60B0frXExvgs5cXCqqq4MTQS 3rHg== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bj4-20020a056808198400b003251b6dda65si2192133oib.245.2022.07.15.10.34.31; Fri, 15 Jul 2022 10:35:00 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229912AbiGOR3d (ORCPT + 99 others); Fri, 15 Jul 2022 13:29:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229874AbiGOR32 (ORCPT ); Fri, 15 Jul 2022 13:29:28 -0400 Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF5121A3BD; Fri, 15 Jul 2022 10:29:27 -0700 (PDT) Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-31cf1adbf92so53604967b3.4; Fri, 15 Jul 2022 10:29:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y3B/xuKwwDaDPj70H09iMM0q55vMJN+NwGOuzYtaHOE=; b=c+zhcPzJ0hSb99mKoy42nxtkX8UqM6uzFWUiQCxxPXv8m81qY9CgLF0+vrfZhidPx9 eA7CBpjwRcapaKIYdi28RxXpWrX+n1twBH7MK54aLEC6OAmoMxtaTEZgHIqUT9YAJQs0 oeSNqY0HGikV7zKFdlXQOY2XKYKj1Bg8y35y4dS98GxtSIgxyuCJGFb+s9Vzom+J47/K nO6jThQnlRophfn/abHlAYQf491KGKZD5S/9jESraHOXai5NB0X/MO7W/cV6j9oJQiuK FyFGVQOLMprDZsXaOtjWnbCan5J5nu6F36xS3FQP9vStytP1K4XERM4E1H5YTEGf+Evj Gb1Q== X-Gm-Message-State: AJIora9ErYNNHDPk27FqmgpVglLxMpHTsbnwDOSuoFFkuSPIAffjNEe2 9UDhQzS+K7Sk7WL0YVJaEIFZfrzec8Jf/Xz6MkLSRGTq X-Received: by 2002:a81:17d0:0:b0:31c:c5e2:fc1e with SMTP id 199-20020a8117d0000000b0031cc5e2fc1emr17464866ywx.196.1657906167225; Fri, 15 Jul 2022 10:29:27 -0700 (PDT) MIME-Version: 1.0 References: <20220711124229.16516-1-lukasz.luba@arm.com> <1198724e-d94f-0b7c-9c4a-90595f8426d2@arm.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 15 Jul 2022 19:29:16 +0200 Message-ID: Subject: Re: [PATCH] cpufreq: schedutil: Move max CPU capacity to sugov_policy To: Lukasz Luba Cc: "Rafael J. Wysocki" , Viresh Kumar , Linux Kernel Mailing List , Linux PM , Dietmar Eggemann , Vincent Guittot Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 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.