Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1815277rwb; Thu, 8 Dec 2022 15:59:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf5xIdfzEtx84FOXxbiK9APNXgTkSC2xOVjBsWaqcZU/qZ/as6WuC/bTV8cXNDMKuKU2CPvv X-Received: by 2002:a05:6a21:2d84:b0:a4:7077:5bf5 with SMTP id ty4-20020a056a212d8400b000a470775bf5mr2643686pzb.4.1670543969261; Thu, 08 Dec 2022 15:59:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670543969; cv=none; d=google.com; s=arc-20160816; b=RrgGR2iB0ISXQEs9XfsN+2q3C241hL3+rRxOx6SglWQyqbLbXrXxz4j3WB9V8qvFNm TiXaY3+t2yXix9wc6KZr+82b8KYbSlnVpQZYvexoV0Oa4hbQExKyRjqqG9x5lINwyQ4F fuaH2FYdbsm2aYnhiQv9vC2fpzIzWYPy9KQqjv3spE5diiwiYSwyQrFc+BC3O8xZqCdX i8jdQ5fkYh9xpnpV/QiHuh/jScez8+EeO4azTRd9MKd5jwDxabM/2vhj6m7ADkUrEK6H o6JxXISETTWMKQNqPuQiYGSAXAcyDUuoZCCJBdzRQj20answZccw/5RkIo3RPw4KNg/y NlmQ== 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=MQRFUCugIpCc3nJPPZoXBXwJxeGE8cAxgdJDMoSfyBM=; b=udhBmKBr8wW2H5ASTwCwPjcMRrrNT20ZRO2KVNXRi5aKvFEls3rTxMVlH1AQVUM42L q+2lD2V5XL8Zi9VyzW0nhMBS+DVHNNLS6tlxKECm8RfFAWoDqfluTHNmGbIBhCaOyP0o cbAJdYZ2N46zMb9Cv5Bp35BIMD2ovpqreviQk+AyGhR/Ytlxb19VJsy4DzcfmjtPjhAA uuTk4A5C3/nBXq6GmPw/Vx6VlcoYpbTldaec/Zq9UMn2jazQjcWX10qT9c3tCsUKSWwz wr9u8U1iyLQCGE8Ar5hSbMYJ8Am3qK0kcm/WhvOAzmlHEV2qDa6IyEOAoPHH1I0ZZxVD asuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SmaZOE+o; 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 202-20020a6304d3000000b00439fb921f8fsi24944324pge.460.2022.12.08.15.59.19; Thu, 08 Dec 2022 15:59:29 -0800 (PST) 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=SmaZOE+o; 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 S230301AbiLHXlW (ORCPT + 74 others); Thu, 8 Dec 2022 18:41:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230299AbiLHXlF (ORCPT ); Thu, 8 Dec 2022 18:41:05 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44A90A19B4 for ; Thu, 8 Dec 2022 15:38:52 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id s7so3097443plk.5 for ; Thu, 08 Dec 2022 15:38:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MQRFUCugIpCc3nJPPZoXBXwJxeGE8cAxgdJDMoSfyBM=; b=SmaZOE+oKoKxAup/qiJcDl+2tiXztqeWmNcoMWgHHRrxzFBaIT6LnxnVQpWlC/TV25 l+Y296UUy4vDPcxSYFJZiLyBvL2MukA5opDNQH19OyzWVJsKDdiFyUCSLSEisS9V4ZIe dYH6nFbfaS1hTb8cBOiY9nd5sClx3uy/cU3CRD3cm1M666yarHVn1GPxpk8Wd4Z6VMjf 6NViqUKNQrb9EClwxghHOfX5RWo6hWmwWKEY9Q1AY7lqL6BFwT8UEAr7DI0VjjSBK373 Yl3VImAWKHH3YFpxdwaIFcC/mb3d9AR9zIB+628FIV0ihjnFLpt9bLQRwy/NqWAsxFP+ 0fkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MQRFUCugIpCc3nJPPZoXBXwJxeGE8cAxgdJDMoSfyBM=; b=NyCIqNttQzp56n6oFtvVZ36kS1uoSK9IL/saBxE1pv1meLQTmXKEIXS113+RSVb0xA tvDPL9J6/PgHnCQPGH91MA3s6Zxu9T5scstYcBp1dnwAvhAwsPepDBeGKg735Mg8lmS6 z0gDzoMgwzG/b1xK+c8tMJrFeJYJ1HqfO5ZAFqc0IAmuRoqdzbHkbOvvrFSZt3R0x0JW 92dfI5oybwiY1M40i0JDeMhnoMprKAboI8lt+3LA3JVesINaVrt499gLr/ra9IRcJ2I4 PofXZQzjgEGClucS76TRFXqDEfS2AMvScdY/NitFodhRzH65rAPMeIUUiQqNi2LcEB08 5lZw== X-Gm-Message-State: ANoB5pnYUKslGNl2+J+g4pSAd06MuH7QnHq5tMkAMGZkxgX2U0jmCavk pTZiRTK8nblEwgda1BWpsejmew== X-Received: by 2002:a17:90a:8c82:b0:213:1e29:c8dd with SMTP id b2-20020a17090a8c8200b002131e29c8ddmr3647540pjo.7.1670542684756; Thu, 08 Dec 2022 15:38:04 -0800 (PST) Received: from localhost ([122.172.87.149]) by smtp.gmail.com with ESMTPSA id q8-20020a17090a1b0800b0021937b2118bsm52777pjq.54.2022.12.08.15.38.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 15:38:03 -0800 (PST) Date: Fri, 9 Dec 2022 05:08:01 +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, saravanak@google.com, wusamuel@google.com, isaacmanjarres@google.com, kernel-team@android.com, juri.lelli@redhat.com, peterz@infradead.org, mingo@redhat.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de Subject: Re: [PATCH v3 1/1] cpufreq: schedutil: Optimize operations with single CPU capacity lookup Message-ID: <20221208233801.s26awslkx6aloxyd@vireshk-i7> References: <20221208160256.859-1-lukasz.luba@arm.com> <20221208160256.859-2-lukasz.luba@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221208160256.859-2-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 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 08-12-22, 16:02, Lukasz Luba wrote: > @@ -332,12 +333,15 @@ static void sugov_update_single_freq(struct update_util_data *hook, u64 time, > struct sugov_cpu *sg_cpu = container_of(hook, struct sugov_cpu, update_util); > struct sugov_policy *sg_policy = sg_cpu->sg_policy; > unsigned int cached_freq = sg_policy->cached_raw_freq; > + unsigned long max_cap; > unsigned int next_f; > > - if (!sugov_update_single_common(sg_cpu, time, flags)) > + max_cap = arch_scale_cpu_capacity(sg_cpu->cpu); I will rather do this at all three locations: unsigned long max_cap = arch_scale_cpu_capacity(sg_cpu->cpu); -- viresh