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 3315B219311; Thu, 7 Aug 2025 10:25:03 +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=1754562307; cv=none; b=HDSdSz+qh1ohwbvBdG+lUh2uCSplT1DNvtNd4Pe/kpiFweltS293XF83UNuVuO/eHS+BOl7bnFBp1qQfuj5fyjFy/iluiu7oCzwLho8eOQefGNTTrr61V3w7MKJAwp29Bb6GtIY36WEfXxCcBcOBx/f1Zj9B3zM47vKgCVObRWQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754562307; c=relaxed/simple; bh=U1GAhsFmP/9ZpJ0WEA2ajL6DUWdnUB3fZA0kjlfVRVY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tYDrdA2WFwjv//lm0SRCAkI7p8/V+rHExxZHbaLoZYs9pYJ24Me6cK3RGiOogTVQ9Ta5BXLMtGK6jFRyzCo61YoWprmJKpf1Ieh+4wGl4jP22EgHmoYvTLqEIXsE+Nnye/er4u5LD3LgFGWkoRdhL7liwcFp6SX7WAfMGRoCUkM= 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 1CF3F236D; Thu, 7 Aug 2025 03:24:55 -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 D77FF3F738; Thu, 7 Aug 2025 03:24:57 -0700 (PDT) Date: Thu, 7 Aug 2025 12:24:32 +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-kernel@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, Aug 06, 2025 at 05:01:48PM -0700, Prashant Malani wrote: > Hi Beata, > > On Wed, 6 Aug 2025 at 00:22, Beata Michalska wrote: > > Would you mind giving it a go and see whether that improves things on your end ? > > Note that this is a quick and semi-dirty hack though. > > > > Sure. > The provided patch doesn't appear to work as expected. > With all cores loaded (stress_ng --cpu N), it's returning the same > counter values > across samples. Here are readings from multiple CPUs: > > t0: del:18446603338626579088, ref:192 > t1: del:18446603338626579088, ref:192 > ref_perf:10 > delivered_perf:0 > > > t0: del:18446603338627594896, ref:192 > t1: del:18446603338627594896, ref:192 > ref_perf:10 > delivered_perf:0 > > t0: del:18446603338627627664, ref:192 > t1: del:18446603338627627664, ref:192 > ref_perf:10 > delivered_perf:0 > > I verified separately that the "burst_read" path is being used by the platform > I am testing on. > > BR, > > -Prashant Right .... that's what happens when you are (I am) making last minute clean up. That should fix it. Would you mind giving it another go ? Would appreciate it. --- BR Beata diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index 65adb78a9a87..2a51e93fcd6c 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c @@ -543,7 +543,7 @@ void counters_burst_read_on_cpu(void *arg) static inline bool cpc_reg_supported(struct cpc_reg *reg) { - return !((u64)reg->address != 0x0 || (u64)reg->address != 0x1); + return !((u64)reg->address != 0x0 && (u64)reg->address != 0x1); } int cpc_burst_read_ffh(int cpu, struct cpc_reg_sample *samples, size_t count)