All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ionela Voinescu <ionela.voinescu@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: [PATCH V3 3/3] arm64: topology: Make AMUs work with modular cpufreq drivers
Date: Fri, 8 Jan 2021 09:44:17 +0000	[thread overview]
Message-ID: <20210108094416.GA19952@arm.com> (raw)
In-Reply-To: <20201217105049.z3aqhl4mo56hhqvk@vireshk-i7>

On Thursday 17 Dec 2020 at 16:20:49 (+0530), Viresh Kumar wrote:
> On 16-12-20, 19:37, Ionela Voinescu wrote:
> > I did not yet test this, but reading this comment made me wonder..
> > 
> > arch_scale_freq_invariant() (or topology_scale_freq_invariant()) is also
> > called from schedutil when obtaining the next frequency.
> > 
> > So if we had a system that only partly supports AMUs but had at some
> > point a cpufreq driver that provided FIE for the other CPUs, when we
> > unregister the driver, the cpufreq_freq_invariance static key is
> > disabled. Therefore, none of the conditions for system invariance is
> > now accomplished and arch_scale_freq_invariant() will return false.
> > This will be broken as utilization is still scaled, but the algorithm
> > for computing the next frequency in schedutil will not take this into
> > account.
> 
> I think the best and the easiest solution for this is:
> 
> bool arch_freq_counters_available(const struct cpumask *cpus)
> {
>         return amu_freq_invariant();
> }
> 
> But we probably need to rename it to something like arch_is_fie().
> 

Now that I think of it again (after spending 30 minutes trying to come
up with a more clear solution) I realised this is not actually a
problem :).

The only location that checks the invariance status is schedutil, but
what a cpufreq governor does becomes irrelevant if you remove the
cpufreq driver. The only potential problem is if one then inmods a
cpufreq driver that's not invariant. But I think that might be on "if"
too many to consider. What do you think?

Thanks,
Ionela.

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

WARNING: multiple messages have this Message-ID (diff)
From: Ionela Voinescu <ionela.voinescu@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
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 V3 3/3] arm64: topology: Make AMUs work with modular cpufreq drivers
Date: Fri, 8 Jan 2021 09:44:17 +0000	[thread overview]
Message-ID: <20210108094416.GA19952@arm.com> (raw)
In-Reply-To: <20201217105049.z3aqhl4mo56hhqvk@vireshk-i7>

On Thursday 17 Dec 2020 at 16:20:49 (+0530), Viresh Kumar wrote:
> On 16-12-20, 19:37, Ionela Voinescu wrote:
> > I did not yet test this, but reading this comment made me wonder..
> > 
> > arch_scale_freq_invariant() (or topology_scale_freq_invariant()) is also
> > called from schedutil when obtaining the next frequency.
> > 
> > So if we had a system that only partly supports AMUs but had at some
> > point a cpufreq driver that provided FIE for the other CPUs, when we
> > unregister the driver, the cpufreq_freq_invariance static key is
> > disabled. Therefore, none of the conditions for system invariance is
> > now accomplished and arch_scale_freq_invariant() will return false.
> > This will be broken as utilization is still scaled, but the algorithm
> > for computing the next frequency in schedutil will not take this into
> > account.
> 
> I think the best and the easiest solution for this is:
> 
> bool arch_freq_counters_available(const struct cpumask *cpus)
> {
>         return amu_freq_invariant();
> }
> 
> But we probably need to rename it to something like arch_is_fie().
> 

Now that I think of it again (after spending 30 minutes trying to come
up with a more clear solution) I realised this is not actually a
problem :).

The only location that checks the invariance status is schedutil, but
what a cpufreq governor does becomes irrelevant if you remove the
cpufreq driver. The only potential problem is if one then inmods a
cpufreq driver that's not invariant. But I think that might be on "if"
too many to consider. What do you think?

Thanks,
Ionela.

  reply	other threads:[~2021-01-08  9:46 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15  5:34 [PATCH V3 1/3] arm64: topology: Avoid the have_policy check Viresh Kumar
2020-12-15  5:34 ` Viresh Kumar
2020-12-15  5:34 ` [PATCH V3 2/3] arm64: topology: Reorder init_amu_fie() a bit Viresh Kumar
2020-12-15  5:34   ` Viresh Kumar
2020-12-15 11:53   ` Ionela Voinescu
2020-12-15 11:53     ` Ionela Voinescu
2020-12-15  5:34 ` [PATCH V3 3/3] arm64: topology: Make AMUs work with modular cpufreq drivers Viresh Kumar
2020-12-15  5:34   ` Viresh Kumar
2020-12-15 11:56   ` Ionela Voinescu
2020-12-15 11:56     ` Ionela Voinescu
2020-12-16  0:03   ` Ionela Voinescu
2020-12-16  0:03     ` Ionela Voinescu
2020-12-16  4:38     ` Viresh Kumar
2020-12-16  4:38       ` Viresh Kumar
2020-12-16 19:37       ` Ionela Voinescu
2020-12-16 19:37         ` Ionela Voinescu
2020-12-17 10:50         ` Viresh Kumar
2020-12-17 10:50           ` Viresh Kumar
2021-01-08  9:44           ` Ionela Voinescu [this message]
2021-01-08  9:44             ` Ionela Voinescu
2021-01-08 10:42             ` Ionela Voinescu
2021-01-08 10:42               ` Ionela Voinescu
2021-01-08 11:03             ` Viresh Kumar
2021-01-08 11:03               ` Viresh Kumar
2020-12-17  7:57 ` [PATCH V3 1/3] arm64: topology: Avoid the have_policy check Viresh Kumar
2020-12-17  7:57   ` Viresh Kumar
2020-12-17 10:55   ` Catalin Marinas
2020-12-17 10:55     ` Catalin Marinas
2020-12-18  4:26     ` Viresh Kumar
2020-12-18  4:26       ` Viresh Kumar
2020-12-18 11:01       ` Catalin Marinas
2020-12-18 11:01         ` Catalin Marinas
2020-12-18 11:04         ` Viresh Kumar
2020-12-18 11:04           ` Viresh Kumar

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=20210108094416.GA19952@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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.