Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5859574rdb; Thu, 14 Dec 2023 01:21:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNp06oZFx/CBMRXjKyil3V9LyAeDvArbbxp3P+qSjmnZN89L8j1op1dDL3HJHbeNNaJNdj X-Received: by 2002:a05:6e02:1c8f:b0:35f:82e8:2d3 with SMTP id w15-20020a056e021c8f00b0035f82e802d3mr322044ill.73.1702545674185; Thu, 14 Dec 2023 01:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702545674; cv=none; d=google.com; s=arc-20160816; b=HpUwn4Lxk4+5w578ShTVt0iuypN2OWmhJpl0FUDj8vT5kGXnszpSNfAtXMAgxV88Ym rPflpvdWTrwcrs7hHzqPq1G/qFRS5zM42OXZI5NqT2nqBsV4lO9w5PTE8ACwAtzhl7Wc VVbtfwDf0c8JzuG/XR6xY+RkCXA2Uh4ON9zZY/DViLmeIiAyyl5Emkqg5OUUBsSzDeEf UNKuGUzZwSYKVzWnH8KNLVSe+vFoXhzZHEWmQNFtV2AU7Vy2CLs08VW16pJ6p60DP+ge 0FzGF6KeBPNKnktHMhvnnAuhX9289B7a7/fHnMoUiB7OBAdQqHinOS3B8WGbx6iG3qKc i4mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from:cc :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=yOboyaU3pu7otCpvcQkBSESbATbINtSl6yle4YwKxiE=; fh=eBmn9ySFf/DCG1CzivBG1inlX/woy19HTfsa54s8xWE=; b=lwcvQ5es+Wcqo2D9ZpHap+hKdltcBBFz7P2zqEEP7Nt1Wn0NueRyaSsWtGZfNEenIH 772Fiqxlg/85VuSkjrOo3vU0yCegt6K8GZE1KY9SIATXeLxrPWoNyARZCgsbdXRalGFu k7D4vyMcFRY9zR7HdqmIlNmrb1LuUoNmTaZMVPX45/4ojXaywblk5RKS5G7OO9xqPfFA h5IjNIIPs7oog5JgpTN/pT9ccO8G0ajPmMZZrGL8yJfmHzuYlpPmsrymSN/3W0C8GCmn wPdm3dftGtpCGeZNEDmHj2sKLg+YKAh7P67a3/jPovIFr8Zeg1+tGgJzZ2dyezCnoUME okaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id q200-20020a632ad1000000b005ca4098bf66si3608921pgq.637.2023.12.14.01.21.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 01:21:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 9BE618083DF6; Thu, 14 Dec 2023 01:20:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235450AbjLNJUK (ORCPT + 99 others); Thu, 14 Dec 2023 04:20:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbjLNJUH (ORCPT ); Thu, 14 Dec 2023 04:20:07 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B373EA6; Thu, 14 Dec 2023 01:20:13 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AEA7DC15; Thu, 14 Dec 2023 01:20:58 -0800 (PST) Received: from [10.57.85.242] (unknown [10.57.85.242]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B14D53F762; Thu, 14 Dec 2023 01:20:08 -0800 (PST) Message-ID: Date: Thu, 14 Dec 2023 09:21:11 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/4] cpufreq: Add a cpufreq pressure feedback for the scheduler Content-Language: en-US To: Vincent Guittot References: <20231212142730.998913-1-vincent.guittot@linaro.org> <20231212142730.998913-2-vincent.guittot@linaro.org> Cc: catalin.marinas@arm.com, will@kernel.org, daniel.lezcano@linaro.org, mhiramat@kernel.org, rui.zhang@intel.com, vschneid@redhat.com, bristot@redhat.com, bsegall@google.com, dietmar.eggemann@arm.com, juri.lelli@redhat.com, peterz@infradead.org, mingo@redhat.com, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, agross@kernel.org, konrad.dybcio@linaro.org, andersson@kernel.org, viresh.kumar@linaro.org, sudeep.holla@arm.com, rafael@kernel.org, rostedt@goodmis.org, mgorman@suse.de, amit.kachhap@gmail.com, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org From: Lukasz Luba In-Reply-To: <20231212142730.998913-2-vincent.guittot@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 fry.vger.email 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 (fry.vger.email [0.0.0.0]); Thu, 14 Dec 2023 01:20:30 -0800 (PST) On 12/12/23 14:27, Vincent Guittot wrote: > Provide to the scheduler a feedback about the temporary max available > capacity. Unlike arch_update_thermal_pressure, this doesn't need to be > filtered as the pressure will happen for dozens ms or more. > > Signed-off-by: Vincent Guittot > --- > drivers/cpufreq/cpufreq.c | 48 +++++++++++++++++++++++++++++++++++++++ > include/linux/cpufreq.h | 10 ++++++++ > 2 files changed, 58 insertions(+) > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index 44db4f59c4cc..7d5f71be8d29 100644 > --- a/drivers/cpufreq/cpufreq.c > +++ b/drivers/cpufreq/cpufreq.c > @@ -2563,6 +2563,50 @@ int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu) > } > EXPORT_SYMBOL(cpufreq_get_policy); > > +DEFINE_PER_CPU(unsigned long, cpufreq_pressure); > +EXPORT_PER_CPU_SYMBOL_GPL(cpufreq_pressure); Why do we export this variable when we have get/update functions? Do we expect modules would manipulate those per-cpu variables independently and not like we do per-cpumask in the update func.?