linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Ionela Voinescu <ionela.voinescu@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-kernel@vger.kernel.org, Sudeep Holla <sudeep.holla@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: topology: Drop the useless update to per-cpu cycles
Date: Thu, 10 Dec 2020 09:57:14 +0000	[thread overview]
Message-ID: <20201210095714.GA13331@arm.com> (raw)
In-Reply-To: <7a171f710cdc0f808a2bfbd7db839c0d265527e7.1607579234.git.viresh.kumar@linaro.org>

On Thursday 10 Dec 2020 at 11:17:40 (+0530), Viresh Kumar wrote:
> The previous call to update_freq_counters_refs() has already updated the
> per-cpu variables, don't overwrite them with the same value again.
> 
> Fixes: 4b9cf23c179a ("arm64: wrap and generalise counter read functions")
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  arch/arm64/kernel/topology.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
> index c8308befdb1e..f6faa697e83e 100644
> --- a/arch/arm64/kernel/topology.c
> +++ b/arch/arm64/kernel/topology.c
> @@ -314,7 +314,7 @@ void topology_scale_freq_tick(void)
>  
>  	if (unlikely(core_cnt <= prev_core_cnt ||
>  		     const_cnt <= prev_const_cnt))
> -		goto store_and_exit;
> +		return;
>  
>  	/*
>  	 *	    /\core    arch_max_freq_scale
> @@ -331,10 +331,6 @@ void topology_scale_freq_tick(void)
>  
>  	scale = min_t(unsigned long, scale, SCHED_CAPACITY_SCALE);
>  	this_cpu_write(freq_scale, (unsigned long)scale);
> -
> -store_and_exit:
> -	this_cpu_write(arch_core_cycles_prev, core_cnt);
> -	this_cpu_write(arch_const_cycles_prev, const_cnt);
>  }

Right, no need for this anymore!

Reviewed-by: Ionela Voinescu <ionela.voinescu@arm.com>

Thank you for the fix,
Ionela.

>  
>  #ifdef CONFIG_ACPI_CPPC_LIB
> -- 
> 2.25.0.rc1.19.g042ed3e048af
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-12-10  9:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10  5:47 [PATCH] arm64: topology: Drop the useless update to per-cpu cycles Viresh Kumar
2020-12-10  9:37 ` Sudeep Holla
2020-12-10  9:57 ` Ionela Voinescu [this message]
2020-12-11  6:48 ` Viresh Kumar
2020-12-15 12:30   ` Catalin Marinas
2020-12-15 17:44 ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201210095714.GA13331@arm.com \
    --to=ionela.voinescu@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).