Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5780179rdb; Wed, 13 Dec 2023 21:43:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjJREDjdMKjALfjgg7btknIVbJrXjoADIN0ykIeg+tfnoEpopzlHETzhj7hMilvwPGkpdO X-Received: by 2002:a05:6870:858d:b0:1fb:2f58:f1c4 with SMTP id f13-20020a056870858d00b001fb2f58f1c4mr11083628oal.48.1702532601964; Wed, 13 Dec 2023 21:43:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702532601; cv=none; d=google.com; s=arc-20160816; b=vu8IbpBS48+76Dwkw0IxD2eSALh0BaaMfGoPTKFNhRmu+4VjLpUY3MzbFeSuwNGj5N 0Peggb+2ocA7R4BR47UZHBKP8KWWVsOqTlnpBGodyIuGvFTK0aDDuAbm4cDs5r5PstV6 VVCY7wU18tZlqcOOgBMWlpTG0h077xSrRH+IV3eHsHneLeUPDo5D58Zg3uPZ4qXozpge WJLobSmbUTUpsyVKDtitWdAzAsSRMbnOF1BBYd42xgXl6j2XHwMyGNqG7FqD+crNIph4 rfCx586qbg08xD68QOtSfVzK6PrRBqlgiZ5V4JgbvkhGYJHHXwL8vQ0AO3oAbbiCnIIj 35+g== 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=2zJEKJBJdRMRCgJFJEeFLk/7+B+l3ptfOOAh8xQH8eM=; fh=CZ1JduxW3n+5hVBx9gwFezA6MRQIvCP5CJ9KY4L+c7I=; b=JwrxpB247GMIf1ebYVS1sWSCG72F69smcTr3Gars2NkT0SHZRk6DLnOHAPw8qm1zBw LiqAuIH5Qo5kyrU0K2EuOluB++lSJmQNHc5MxCKF95LZAJFRpEXKeBgPUKb85TQsTb7Q Lt+SF9Vy4ldW4sKR/b9R1RdRxRuqgI8zKP//RDINZ9ryr7TG+XITY6cs8Plt8W1D/N3G c4vV/ZCzRaFHgkGhuQa0TVDnthSqtJeWYNslR7mn0vEQwOkNmCIYwveEJLl2l4CO9s56 kd4Tqe1KuVqYSMA7vOMWbhhB8BUl5zCPvHDD61Qt2iB/AIdVgwOrkIe05jmHGXoH5Xf/ XtEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WrqT+Jqi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id i14-20020a63e90e000000b0059f0cebd046si10625066pgh.729.2023.12.13.21.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 21:43:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WrqT+Jqi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 8403C802A82E; Wed, 13 Dec 2023 21:43:20 -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 S1443206AbjLNFnL (ORCPT + 99 others); Thu, 14 Dec 2023 00:43:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443207AbjLNFnE (ORCPT ); Thu, 14 Dec 2023 00:43:04 -0500 Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B97F4111 for ; Wed, 13 Dec 2023 21:43:10 -0800 (PST) Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3ba14203a34so2968115b6e.1 for ; Wed, 13 Dec 2023 21:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702532590; x=1703137390; darn=vger.kernel.org; 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=2zJEKJBJdRMRCgJFJEeFLk/7+B+l3ptfOOAh8xQH8eM=; b=WrqT+Jqi05FHIN9RA9jJYU6rmRrrb9c2uYCg7CqClmZEKbuxij6nuCEwuCEzZisDA9 rjIwi3NguPfra4YUpb+J/ermcBAh6DSe2ciLhrVr9TgF/KVVvcNm1O1EEQor5QScpIsR bXNbRtAqBLLvN+Ukx2LjpYKFdoXiwDJM58Yjyj4JT0OwYIJ5lYw6WJdSgA9W+2m6oDuM t8PPjoXKPl2KDzXeNnI6KXRzA4xpOBjeAWFbTNKR+e1XAtmgfRTTPL6UWe/S8/+8zJQf kvUf7HH11AgZgfTZFSMMUtAxuf6pp2YUpzgaZEvtyHBFZUCvchX4NnRgPxYQzda1LGy6 01dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702532590; x=1703137390; 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=2zJEKJBJdRMRCgJFJEeFLk/7+B+l3ptfOOAh8xQH8eM=; b=LEZvql7AljaeS+JqqzutnV1Slj4oeK+3qHw2or5fYftqU5z+LmDRNAbg8l5VBxiZ9P k3PaUwDEEIsR+W6VkNsuLqgZ4WVMLKXGHL79wGP/BmpZ4nA0NuDndQldBHTjqCIkT2bZ U3LuZz3bk/2W7Ax7JUFYWQbV6Q5jUFsgScb9tNlV+0D60EnitqVkqfZBItV5VvTtSPs5 8X7HoEDHYQixfdXVFikw/Rq2XXYblcpAXmUFqRK7kBDTPLSPf6As985MPM4i58v+FC7e SOejCY/gjoTl9M65MlBUb+R+2MBXv9onndF8bFtgQSFCUodVdyNJ+a38YxpYLm6lcBcS KLRg== X-Gm-Message-State: AOJu0YwMJnymKAuN5GDNOpWshKvPVV2jP3UOgA9sikvK06JmnsabKWcc qvyV9UUQtVqRf2FZ3QuLfI3yzg== X-Received: by 2002:a05:6808:11c8:b0:3ba:2af:c7da with SMTP id p8-20020a05680811c800b003ba02afc7damr9445649oiv.110.1702532590040; Wed, 13 Dec 2023 21:43:10 -0800 (PST) Received: from localhost ([122.172.82.6]) by smtp.gmail.com with ESMTPSA id x20-20020aa793b4000000b006ce4c7ba448sm10887964pff.25.2023.12.13.21.43.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 21:43:09 -0800 (PST) Date: Thu, 14 Dec 2023 11:13:07 +0530 From: Viresh Kumar To: Vincent Guittot 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 Subject: Re: [PATCH 1/4] cpufreq: Add a cpufreq pressure feedback for the scheduler Message-ID: <20231214054307.axl33gagxacidjbn@vireshk-i7> References: <20231212142730.998913-1-vincent.guittot@linaro.org> <20231212142730.998913-2-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231212142730.998913-2-vincent.guittot@linaro.org> X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 21:43:20 -0800 (PST) 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 ? -- viresh