linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Ionela Voinescu <ionela.voinescu@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: topology: Cleanup init_amu_fie() a bit
Date: Thu, 10 Dec 2020 18:04:39 +0530	[thread overview]
Message-ID: <20201210123439.zugex2zzbmy6z3le@vireshk-i7> (raw)
In-Reply-To: <20201210112912.GB5300@arm.com>

On 10-12-20, 11:29, Ionela Voinescu wrote:
> On Thursday 10 Dec 2020 at 16:25:06 (+0530), Viresh Kumar wrote:
> > - But right after that we call static_branch_disable() if we aren't
> >   invariant (call to topology_scale_freq_invariant()), and this will
> >   happen if amu_fie_cpus doesn't have all the CPUs there. Isn't it? So
> >   partial amu support is already disallowed, without cpufreq.
> > 
> 
> This is the point that needs clarification:
> 
> topology_scale_freq_invariant()) = cpufreq_supports_freq_invariance() ||
>                                    arch_freq_counters_available(cpu_online_mask);
> 
> This checks if the full system is invariant.
> 
> The possible scenarios are:
> 
>  - All online CPUs support AMUs - arch_freq_counters_available() will
>    return true -> topology_scale_freq_invariant() will return true.
> 
>  - None of the CPUs support AMUs, or part of the CPUs support AMUs - the
>    system is invariant only if cpufreq is invariant (dependent on
>    whether the driver implements the proper callbacks that results in
>    calling arch_set_freq_scale() in cpufreq core.
> 
>  - Either cpufreq does not support invariance or we don't have AMU
>    support on all CPUs -> the system is not invariant so we disable
>    the AMU static key that guards the calls to
>    topology_scale_freq_tick() - we would not want to set a scale factor
>    for only a part of the CPUs.
> 
> So whether were are or are not invariant does not depend only on the AMU
> presence, but also on the cpufreq support for invariance. We have to
> disable invariance altogether (including the AMU guarding static key)
> if the system is not invariant (it no all CPUs have means to provide the
> scale).

Okay, I think I mis-assumed that amu_fie_cpus will get set by
enable_policy_freq_counters() even for CPUs where AMU support isn't
there, it won't be though.

Having said that, this patch, along with the minor suggestion in the
commit log, still stands fine, right ? The other patch which I sent is
probably incorrect due to the above assumption I had.

-- 
viresh

  reply	other threads:[~2020-12-10 12:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10  7:18 [PATCH] arm64: topology: Cleanup init_amu_fie() a bit Viresh Kumar
2020-12-10  9:42 ` [PATCH] arm64: topology: Avoid the static_branch_{enable|disable} dance Viresh Kumar
2020-12-10 11:09   ` Ionela Voinescu
2020-12-10 12:35     ` Viresh Kumar
2020-12-10 10:34 ` [PATCH] arm64: topology: Cleanup init_amu_fie() a bit Viresh Kumar
2020-12-10 10:38 ` Ionela Voinescu
2020-12-10 10:55   ` Viresh Kumar
2020-12-10 11:29     ` Ionela Voinescu
2020-12-10 12:34       ` Viresh Kumar [this message]
2020-12-10 13:26         ` Ionela Voinescu
2020-12-11 11:05   ` Viresh Kumar
2020-12-14 16:14     ` Ionela Voinescu
2020-12-10 13:22 ` Ionela Voinescu

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=20201210123439.zugex2zzbmy6z3le@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=ionela.voinescu@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vincent.guittot@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).