Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4118800imw; Tue, 12 Jul 2022 02:06:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tKeeDAo6G8yFhTY3QnQweQTS+Il41XutsrZyCIv3BeFqFgNQEi90K7zRfL6zAlEVqm2JJN X-Received: by 2002:a05:6a00:1901:b0:4fa:fa9e:42e6 with SMTP id y1-20020a056a00190100b004fafa9e42e6mr22875487pfi.1.1657616779627; Tue, 12 Jul 2022 02:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657616779; cv=none; d=google.com; s=arc-20160816; b=oNi4To5RVvfiM0Yy61S9rkxP2Q9+cQeNw1zi+aaRQ5tI65bmKC7PmhCKhoF0W+wfcw LXWEWJj7JedMxPvHezBpaY4heEXGF2OOAEegMJ83vZGDKer/1L0jUqg7tx1Gyjavvw/1 MmjKrAvGRERedjzf7UV7e34LZ/ChMTwvPVHCYguKrhLjXZsylnWQV9sEeYq+SrxpNd40 iroVK2DqANWSApZ30QqvUXEKBWrpDq4g8vzxO6h0faS+C2bnDkOlPcd6eSxbgeJyoO0z oTwpPgk05vbcF6E/ZXas2QFY3wG24vahKld8u3kApvecgqkzQ8asm+pLsO0Kg+gxbucD ARKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9jlvp3ctzfV5qIwygKhimi/OMZvViFDBhQEGu7/yFHI=; b=NOAfY9ZAcsBAgB0M6Gx5bTb38gpzMHNrdkn86VPflXhHrOnbBs8Rn68rziNeNxUpyJ /OsuqiYRsJ3WxX9MgfzFLy2LFXEAm2NFSrC5dCLTjVKLl8EZse9LjfbRB2FeHhfTedWi W1gLPE0FwUtcvplXUqpp9V4wCl2iOPwep9Z4zovaaI04Z4fW0iyQwqfm8i5GEMlJ4HTu 5TbpG/BSZCQtBO51WLTos/vmC82EWuTX7c2uvY0qtnGYawNn9iw7HvGlJ594Njb94y6m 8y0KiTmgl+lM3Sx9J3LDLw+W14u4foEJHDUFE+i9d73T2yIyn2a/oAy/5B5TQedySItA c/Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kzLKsiAj; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cx17-20020a17090afd9100b001ef7d96eca7si15464084pjb.75.2022.07.12.02.05.59; Tue, 12 Jul 2022 02:06:19 -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; dkim=pass header.i=@linaro.org header.s=google header.b=kzLKsiAj; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232136AbiGLIlp (ORCPT + 99 others); Tue, 12 Jul 2022 04:41:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230225AbiGLIlm (ORCPT ); Tue, 12 Jul 2022 04:41:42 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DBDCA5E47 for ; Tue, 12 Jul 2022 01:41:41 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id l12so6654177plk.13 for ; Tue, 12 Jul 2022 01:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=9jlvp3ctzfV5qIwygKhimi/OMZvViFDBhQEGu7/yFHI=; b=kzLKsiAjlkufjLDqxapjEYgh1ncbzgUECLW+oHEZVys0qAYcP5sn6XnrSv2Awsbk3v vaImKcE/YZfn8AzNPNKbopI/23QAPmafu/HOvBFr/mTB5xtRR3GGJ/Lq/lz88K1h4m51 NiDl3LyxnUUoT82Jk/KhkQJ1yEJTW3DqpbYO0MnhPEgqD4dc5tYPsThWnoNrtQ728teU JDE+DSUJ2vfntqY4SQ6gpDU9Y+EUY7EkLM5kC9CgizxqAxTIsmu/Y63aCmBteDtIYl1f kvKmA/zpWkf7tktfx/ui/7XvzbnyKkayZvBL59rGSLDFB6lHIUsV/MeeQlwN9Nfrw8Nr 1DTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=9jlvp3ctzfV5qIwygKhimi/OMZvViFDBhQEGu7/yFHI=; b=rXlYNavpknP2Ei166K91GBfUT4jWV2r9lQzZjTHNl/abAaPl/D6vqFT1QjyhOq6HaF mlEwaOo3ibqBBHfn0g6h0Li/Wea5V1LToC8V5ySS/zSIS+Hc1a4nVwEMXrvLwREcxYfl filmHW/JXhWpCTAXrGlcL/I68PcFVZZU+cmR2rugSiLXG2RuMYqtSe3UKjqF0RXZjQhT 7PT/InGiFTps7ibP7xq2Yz6nmeRxqit5dvC7wq//3OtxiFz5qf8JWB8wdqc1UMD2eADg nhJA0c/HbFQe4WVWmVhOsCmpbbuYbiRkpMymZAUQgo9cwKpP4ZzHAscbk9tJ7H64vMpe P8cQ== X-Gm-Message-State: AJIora8LJVAaOdC+KmDMge6gwM2kjxnuqJba+MdmEcelRZPb6dk74pEd VphJ55jV4H3YmuIpykfrUpKwGg== X-Received: by 2002:a17:902:ce8c:b0:16c:4be6:254d with SMTP id f12-20020a170902ce8c00b0016c4be6254dmr8898036plg.51.1657615300935; Tue, 12 Jul 2022 01:41:40 -0700 (PDT) Received: from localhost ([122.171.18.80]) by smtp.gmail.com with ESMTPSA id l7-20020a622507000000b0052aaf7fe731sm6174399pfl.45.2022.07.12.01.41.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 01:41:40 -0700 (PDT) Date: Tue, 12 Jul 2022 14:11:37 +0530 From: Viresh Kumar To: Lukasz Luba Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rafael@kernel.org, dietmar.eggemann@arm.com, vincent.guittot@linaro.org Subject: Re: [PATCH] cpufreq: schedutil: Move max CPU capacity to sugov_policy Message-ID: <20220712084137.pb24lolhuk2yln4e@vireshk-i7> References: <20220711124229.16516-1-lukasz.luba@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220711124229.16516-1-lukasz.luba@arm.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 11-07-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(-) I tried to check all possible combinations on how this can break, but couldn't find one. I had to check that as this code is there since ages and none of us thought of it, which was surprising. Acked-by: Viresh Kumar -- viresh