Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp722983pxb; Fri, 15 Oct 2021 14:55:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwApLmDKnRWVqTkZGIZ+7urpEIeQt1gbr0xAyzzFRI8+9GSWdVwtJvwoORr1/oV5BKMF5M+ X-Received: by 2002:a17:90a:430e:: with SMTP id q14mr30077444pjg.55.1634334905131; Fri, 15 Oct 2021 14:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634334905; cv=none; d=google.com; s=arc-20160816; b=xgo9jbIUh2Gsq4J0O3A4c9o55KNjGfHZRTZki2naalVLeBOZCAkBLNn4Vni16ciNT6 KMLhZ+aTeEJaBxzZjI+NhNh7WM6ojf+Jz1h2OEPvB0OsVHxkZqp/D1tikC0lTGuhfY8N jM9vC0cqtfAkiD8cUX+Q3m4ZGs9h64YrAcPnfCYwfUvy6pXL0e84Q3P1ur2ApjwrGXRU d+c4LVXVK/QN2ZtewMTeysA9Qs/rgdQYEbMz2mtAzWb3t1CEsumZOTJ2STAl5Tc47Mkk wAQnv1r1ptVcjSGOXQzrHX3madQCF+ULWdljBwoe0tFsG/dGWSLGvD0mAOxCtxofyylg ojRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=8kbmHDDqJviKwRq/NTnyCEtRtwoCMH6PGHSJN19L5k0=; b=XalaXCaujO3yqVFhMD1gQvXsv1mG/TIDUIB7yEBuDMZ50U5jTH9R6f3ehRl5Tx9wvH XXE574RbKF/3uWaKLKTVyVyBm+3nMtI7VwwJx+C3CfhJ1LzY6/DmDhduG0PD/enSmrSI fCpf51Knzp9KUr1MqTDaKTZZ2q/htekACm918IRpAbyDZqEcZOdXvuMQM7V99rQM0KXf 3sPrlwX3B14eC+L/9qG4/1BvxoaPw0SmzSAhaQIxuJ+yS+aT+ySUDmWYEP8AOZtjaATN cXLZMhyrpFGlwgqlMdhJ01Ged99iy5oLQ/+1XWqDdlth19yxU2WsUu6CwNt1JOYtCP2l Hpdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s11si11645811pgp.222.2021.10.15.14.54.53; Fri, 15 Oct 2021 14:55:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238704AbhJOMP6 (ORCPT + 99 others); Fri, 15 Oct 2021 08:15:58 -0400 Received: from foss.arm.com ([217.140.110.172]:41688 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231463AbhJOMP5 (ORCPT ); Fri, 15 Oct 2021 08:15:57 -0400 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 76B9E147A; Fri, 15 Oct 2021 05:13:51 -0700 (PDT) Received: from [10.57.23.184] (unknown [10.57.23.184]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B73F13F70D; Fri, 15 Oct 2021 05:13:48 -0700 (PDT) Subject: Re: [PATCH 3/5] cpufreq: qcom-cpufreq-hw: Update offline CPUs per-cpu thermal pressure To: Thara Gopinath Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, sudeep.holla@arm.com, will@kernel.org, catalin.marinas@arm.com, linux@armlinux.org.uk, gregkh@linuxfoundation.org, rafael@kernel.org, viresh.kumar@linaro.org, amitk@kernel.org, daniel.lezcano@linaro.org, amit.kachhap@gmail.com, bjorn.andersson@linaro.org, agross@kernel.org References: <20211007080729.8262-1-lukasz.luba@arm.com> <20211007080729.8262-4-lukasz.luba@arm.com> From: Lukasz Luba Message-ID: <7ef0ce1c-40c7-ad08-c7e8-5b1a8507508c@arm.com> Date: Fri, 15 Oct 2021 13:13:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/11/21 10:17 PM, Thara Gopinath wrote: > > > On 10/7/21 4:07 AM, Lukasz Luba wrote: >> The thermal pressure signal gives information to the scheduler about >> reduced CPU capacity due to thermal. It is based on a value stored in >> a per-cpu 'thermal_pressure' variable. The online CPUs will get the >> new value there, while the offline won't. Unfortunately, when the CPU >> is back online, the value read from per-cpu variable might be wrong >> (stale data).  This might affect the scheduler decisions, since it >> sees the CPU capacity differently than what is actually available. >> >> Fix it by making sure that all online+offline CPUs would get the >> proper value in their per-cpu variable when there is throttling >> or throttling is removed. >> >> Fixes: 275157b367f479 ("cpufreq: qcom-cpufreq-hw: Add dcvs interrupt >> support") >> Signed-off-by: Lukasz Luba > > Thanks for the fix. > > Reviewed-by: Thara Gopinath > Thank you for the review!