From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 450D5241670; Thu, 31 Jul 2025 08:27:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753950456; cv=none; b=UDxrPy4+uppyv43xfo25oBI+BSRTE+WULbww9jCBI40zQPWSem0TSD+N1MNdssnBq5XStYbgIP6/XspQqWGkJWBho4nmKWuVSymYQgbdUh5ohXpRN66T1pv43nMZwUSLIzZp/Tlt/e4QA96s6wEUywLfjnM+VmsFL45THqPM2nI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753950456; c=relaxed/simple; bh=yLy/Zm8uXdbE14z5VArUhJNLLkG0ebEbV3OslirLnjY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fKU8yVxuCOfP6cm6Zh6yuAl7sOOPZWjt7h35coh7rkkdVwWX7JTJl2LwuTlAODRSQUXm1rh83C4xFO6bwPf2y68VR9uXQxgQVJLMRlWRSvpFo05KWsq2SyiY1CKUUowodPh3KRjYhq4RA3ByHPV6cF7Zi2g4FYcNRlL5AcpzqAU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 5DE621D13; Thu, 31 Jul 2025 01:27:26 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D29453F673; Thu, 31 Jul 2025 01:27:29 -0700 (PDT) Date: Thu, 31 Jul 2025 10:27:14 +0200 From: Beata Michalska To: Prashant Malani Cc: Viresh Kumar , "Rafael J. Wysocki" , Jie Zhan , Ionela Voinescu , Ben Segall , Dietmar Eggemann , Ingo Molnar , Juri Lelli , open list , "open list:CPU FREQUENCY SCALING FRAMEWORK" , Mel Gorman , Peter Zijlstra , Steven Rostedt , Valentin Schneider , Vincent Guittot , z00813676 , sudeep.holla@arm.com Subject: Re: [PATCH v2 2/2] cpufreq: CPPC: Dont read counters for idle CPUs Message-ID: References: <20250722032727.zmdwj6ztitkmr4pf@vireshk-i7> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jul 30, 2025 at 12:31:33AM -0700, Prashant Malani wrote: > Sorry for restarting this thread, but I think the solution submitted > solves the write path. The read path still needs addressing. > > As such, given the limitations and scheduler uncertainties > around the reads of the FFH registers, I think the patch in this > thread is still a good optimization to include; namely, if we know > the CPU is idle, don't bother trying to wake up that CPU just to > calculate frequency. > I am still wondering whether cpufreq core is not a better suited place for checking whether the CPU is idle. We could potentially try on anther CPU within the policy and if there is none, just provide the last known freq ? @Viresh: What are your thoughts on that ? In the meantime I'm still trying to figure out smht to mitigate the issues with the numbers we get from counters after waking up the CPU. --- BR Beata > > On Mon, 21 Jul 2025 at 23:02, Prashant Malani wrote: > > > > Hi Viresh and Rafael, > > > > Thank you for taking the time to look at this series. > > > > On Mon, 21 Jul 2025 at 20:27, Viresh Kumar wrote: > > > > > > On 21-07-25, 12:40, Prashant Malani wrote: > > > > On Mon, 21 Jul 2025 at 10:00, Rafael J. Wysocki wrote: > > > > > Why don't you flag the driver as CPUFREQ_NEED_UPDATE_LIMITS? > > > > > > > > > > That would kind of make sense given how the driver works overall, or > > > > > am I missing anything? > > > > > > +1 > > > > Thanks, I posted [1] which implements what's suggested by Rafael. PTAL > > > > Best regards, > > > > [1] https://lore.kernel.org/linux-pm/20250722055611.130574-2-pmalani@google.com/ > > > > -- > > -Prashant > > > > -- > -Prashant