Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5825310rdb; Wed, 13 Dec 2023 23:57:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmqzYz4LzajCgax8URxzgeyGcPm9lpDssnibIN1p7oP4ueNVfqtqlYlLOBas3FOAG/D4Og X-Received: by 2002:a05:6359:29d:b0:170:17eb:1df with SMTP id ek29-20020a056359029d00b0017017eb01dfmr5564586rwb.34.1702540652961; Wed, 13 Dec 2023 23:57:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702540652; cv=none; d=google.com; s=arc-20160816; b=VKiXICKQcphajLGYxOOS2eEKO0jnC4fVYe8TowKb3dL5SxOPlda4vwZHLentr0lXJ9 FNBLHEn6ouVgHJX6uy6ShvwVQ/aLuV+qif/1w6wwCUf9o3J0jreqTON+gyL0YGovn8RO L3MA7UURCMbxPKoeaMHHstLhUc87U5r1c04O17R/0aqZKUpxUDe5saAathGeZEZyDva6 TSKVDbQWqyu2ILjI+I1PqEz20X8ZWeMpcdyWxFkTJ21kOuUONr28sYcUsbQrYNKUw6qu tpXM4nuWtAKiKjSFK4gxb5lYndah3xvzQ7b6bAlke7B//heN+/NPheDdBk81DHVG5ICf EYqA== 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:dkim-signature; bh=0d8h/X+8AJFqMWZqP9wn96fliaxprL1waPmEflLUD64=; fh=DanF+BGcbq0x9UCtjIhWDKeRcJtaun91SYknEknP2Qs=; b=NVCoAaNGafQhFSwHdGKnn+OXJ8s7AXdY1B21kFDWDKuMKhD+cpZMRojBcS4EQK77F3 vPYiKfYfgHV4yLVTDnpJWVeqkegoiIbXFrzboywVZGaju1iMZUde5gUNnLHn1HsNeWH4 QwhGy5LQseCFXZQJ3FEAaeQKntR13L5sqVInGXW2BWbDd65e0QTa4rGpyoK7oXjho6Gt YVzqbM/rgudzI1ESNxTLpC51pilbwRQFigWQcwsKan63RuyiqizXDypliZ+laOVfgFrD X5oIRFrCu5posHK4RdvwGbwyBnLznRmeYl+K8qcjqZNtd9WZpQAuBTFRA6UnnySp3Mzg 6QKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="pLRY7/iP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a1-20020a17090ad80100b0028aee1ca4bbsi1854478pjv.136.2023.12.13.23.57.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 23:57:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="pLRY7/iP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BA552802A819; Wed, 13 Dec 2023 23:57:31 -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 S234409AbjLNH5W (ORCPT + 99 others); Thu, 14 Dec 2023 02:57:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232157AbjLNH5U (ORCPT ); Thu, 14 Dec 2023 02:57:20 -0500 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A338F11B for ; Wed, 13 Dec 2023 23:57:26 -0800 (PST) Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6d0a679fca7so1775226b3a.2 for ; Wed, 13 Dec 2023 23:57:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702540646; x=1703145446; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0d8h/X+8AJFqMWZqP9wn96fliaxprL1waPmEflLUD64=; b=pLRY7/iPobQt8nc/XA/Lr3Uj3wYFQMDpqZMrDv9trjYqrFRNT0Qvx8xpOSwywYqmoM TiDc0cqFx06eUlQRG38RgSix7R4SGPrJwwuq4sJRFRBb6XOX1CwX4mXgaFHlzkFFIqV2 jSroyziipH+xBENtpTH2Qq1/JlbHGlriL92QeWbhFeQ0fE0FH5S5Ri5NONCcmvgtU2R8 Kw4EMwXYaSpfgyPN4qE5uw9dKjofIzbOV0kNRuvHo5Ib9qdwPb+b6uexzVTbsFSrZHpO DO3lxPEy+gjPu005kUYaIsk0XnroXVUM48AgoTUan0kNaRIoJMQBx4QTnn480HXAfQ67 Z2Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702540646; x=1703145446; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0d8h/X+8AJFqMWZqP9wn96fliaxprL1waPmEflLUD64=; b=J1T1JemslAZqGd5SZ75xAn9igV1F/3RGxRtcQF2E0u4TAasDpaHvFkoQyw9CaxfvZy rEOrL0Zr9tpbJXLHmKkXZz3n0JvLkFKedmj25pawGEYP+rKyE6Ems1It5VSSQ7xdNih/ GucitknMwa+K2RNrkoPuxjCfkrbGx2837o1gkUZxANhz7BKofxp47kI/NC6uusSddPcJ W4xncbSb/6vQltP4RXU5HbtrUtGqEjBL5HktbZqEp/ltzPO870dl5TZB6odp9QKFOvI3 lEYjY8nDeuh1y4UdhXYTdB0zo2Z6UGBkwl/B2pRv0gxEREfscUdjXJ60VcQvpo52HZE+ HPkQ== X-Gm-Message-State: AOJu0YyiJxp4IhTAoApNg42uuGVhHejbxA456odikHril+x3ldtM9Qav CkmTKGBShBwsaKtwQr6A3UPYd8biJ58MvhnPptNShQ== X-Received: by 2002:a05:6a00:b8e:b0:6ce:751c:c943 with SMTP id g14-20020a056a000b8e00b006ce751cc943mr4858088pfj.7.1702540645901; Wed, 13 Dec 2023 23:57:25 -0800 (PST) MIME-Version: 1.0 References: <20231212142730.998913-1-vincent.guittot@linaro.org> <20231212142730.998913-2-vincent.guittot@linaro.org> <20231214054307.axl33gagxacidjbn@vireshk-i7> In-Reply-To: <20231214054307.axl33gagxacidjbn@vireshk-i7> From: Vincent Guittot Date: Thu, 14 Dec 2023 08:57:14 +0100 Message-ID: Subject: Re: [PATCH 1/4] cpufreq: Add a cpufreq pressure feedback for the scheduler To: Viresh Kumar Cc: catalin.marinas@arm.com, will@kernel.org, sudeep.holla@arm.com, rafael@kernel.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, lukasz.luba@arm.com, rui.zhang@intel.com, mhiramat@kernel.org, daniel.lezcano@linaro.org, amit.kachhap@gmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-trace-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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_BLOCKED, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Dec 2023 23:57:31 -0800 (PST) On Thu, 14 Dec 2023 at 06:43, Viresh Kumar wrote: > > On 12-12-23, 15:27, Vincent Guittot wrote: > > @@ -2618,6 +2663,9 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy, > > policy->max = __resolve_freq(policy, policy->max, CPUFREQ_RELATION_H); > > trace_cpu_frequency_limits(policy); > > > > + cpus = policy->related_cpus; > > + cpufreq_update_pressure(cpus, policy->max); > > + > > policy->cached_target_freq = UINT_MAX; > > One more question, why are you doing this from cpufreq_set_policy ? If > due to cpufreq cooling or from userspace, we end up limiting the > maximum possible frequency, will this routine always get called ? Yes, any update of a FREQ_QOS_MAX ends up calling cpufreq_set_policy() to update the policy->max > > -- > viresh