Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5903774rdb; Thu, 14 Dec 2023 03:06:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IEbiQzeHKtFpay+tOoRx0ktFKf1z/P5BlDA1ffUWw0T/1dpVDUI1tyrJ19azBND745/n6X/ X-Received: by 2002:a05:6a20:158b:b0:190:3295:e1a2 with SMTP id h11-20020a056a20158b00b001903295e1a2mr13336099pzj.90.1702552019031; Thu, 14 Dec 2023 03:06:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702552019; cv=none; d=google.com; s=arc-20160816; b=YXL29ry1ejFMgUWOYEnKlFFx8v6AtNl5fEgZWrl04XWb1zFuAN3lRD84Zoye0tPIxi 0g+MWPeOi/3eZd9qHj6uObgctw7p6LSa3HJzeC53t8HK6r0amJJdQJekcB/z6FtgUQsv faI57rwX4wWFLa2OYewbe49Fvn3UacgRkaIZBOkI4Ie8w3sFJU9nk1zVq6PCo1IWpyPp NsClOljZXC8CDN+fX9TjkLKEvSWQlFt1V1cuGotw8gw9F27+OvWI3Lo/m1bHDuU9a8zr 1OsE9AYgWZSOG1PzfpKmS11ZwE02bbRfXTID15BDlDOkVyUXLC0lkl9FHsO9RHwFIhL2 vbxw== 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=FkFcM58ORD2DTnC5dDqDGqkLUNpEfcQ7GjcBvDad/9k=; fh=+As5U8Kek14NRtH+Nsk3N7xj9+6lN36YnmgKMRyEsi4=; b=rpcelUqAiL2acaG/Q8jf3BLs2YAz0OisQ7Xpud/mw5u3vAIoEOV2BNNZ6OVYUJPgIr cf+PLM7AF/138GKzGaO8DX41YMUMybxA0bcrfqbW2+OQhg9Fw5Eudrhx1CBtPzAvgZoV 9a9wBt4ZMvBeRejktA+UYKxskRzwVH5gpS7AQc7eLx2PH0A5Bd2WCsiMkCjQh5Mi/yvc 3N0vi4zZm21d+KutYuqkUgfQzLG+4tUIJdzeMMxTvDqfBXDtQI8dLV/V88cEj38kxoCm 6vTOkXsyhvgT0+aMW+Rj+d44BApfSd9FXjGfIxhSR7h22IBrPrBRLG/Kw3efLCMTwmdS I7Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DBL1zKoG; 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 141-20020a630093000000b005ca186affebsi6151167pga.276.2023.12.14.03.06.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 03:06:59 -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=DBL1zKoG; 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 ABCC380C0553; Thu, 14 Dec 2023 03:06:48 -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 S1443882AbjLNLGb (ORCPT + 99 others); Thu, 14 Dec 2023 06:06:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443917AbjLNLG3 (ORCPT ); Thu, 14 Dec 2023 06:06:29 -0500 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72CEE12E for ; Thu, 14 Dec 2023 03:06:35 -0800 (PST) Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-6ce7c1b07e1so7091417b3a.2 for ; Thu, 14 Dec 2023 03:06:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702551995; x=1703156795; 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=FkFcM58ORD2DTnC5dDqDGqkLUNpEfcQ7GjcBvDad/9k=; b=DBL1zKoGQAAJUU8LkqPk3CmA5Izw/fZZxJEmeDoNPHE48FeSZ8KsFewNCS6sk2GPqK NOZ6U34jepYTaT7MY5F2VjA6DSMOA36bro2mbZZ2xylUSU9HKZy0IDV0N4uUOAEmFmZK P7gfsPrAi5ffogereHikFjh8JErqRGrEMkNzkNkbfEQiTI0txN8OWVThAd/L/wroszJG z+CwVBLXNGK9riPo5oMOgV16uTK5Hzgwmnhond+WUukuKjk8qehXXlndczDBxHYEcsWd ME8SnhLf4B9VCJrsL0q4xisYZzacVpoxOu0FaZVBukZZR41n0P9X8M6iC9IPTikR/HJa YgUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702551995; x=1703156795; 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=FkFcM58ORD2DTnC5dDqDGqkLUNpEfcQ7GjcBvDad/9k=; b=Ui4w18yO/RpjMmMkvpW6dWaV0kXW4S3O3UwAtO40HpJDLVMsIRvW0AiXT/62yoVEk1 DSpA6+PXGIpXn5tnw0nEXxwd1ry+bPX+Je8+0moVyF3ddpYz6xOLKF5RHPCBlLowNtEC uKxYTtoT+wwrMOhhtlVDs1I5G624WIosPBcnzFYfU9rPHX9lA9svbf34a/ZrIbHIoLCD NPAO1u65KlRjZILod0ngT868wkS7TUds9kANudQ2oobgBc4ac9dBg8IoKulZEgEFsvgV WIyZaA60uu+pZaDmWRiaPddzMW5hcMnpWTGy4U2DozhkaPm4qpAoTaennuk4Q8fVubkt oE3A== X-Gm-Message-State: AOJu0YywP+Zum392c70y2cNjfGKu+mqF/Ht5H5b5BdgUUa2mKgLfjC0f 5PSUGQUBxNyXqx2JVC3vWuT/FxZnDEIekLMKE8XsrQ== X-Received: by 2002:a05:6a00:10c1:b0:6cb:a1fe:5217 with SMTP id d1-20020a056a0010c100b006cba1fe5217mr10062758pfu.16.1702551994935; Thu, 14 Dec 2023 03:06:34 -0800 (PST) MIME-Version: 1.0 References: <20231212142730.998913-1-vincent.guittot@linaro.org> <20231212142730.998913-2-vincent.guittot@linaro.org> In-Reply-To: From: Vincent Guittot Date: Thu, 14 Dec 2023 12:06:23 +0100 Message-ID: Subject: Re: [PATCH 1/4] cpufreq: Add a cpufreq pressure feedback for the scheduler To: Lukasz Luba 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 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_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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]); Thu, 14 Dec 2023 03:06:48 -0800 (PST) On Thu, 14 Dec 2023 at 10:20, Lukasz Luba wrote: > > > > 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.? No, I will remove the EXPORT_PER_CPU_SYMBOL_GPL