linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicola Mazzucato <nicola.mazzucato@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>, vincent.guittot@linaro.org
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
	devicetree@vger.kernel.org, sudeep.holla@arm.com,
	rjw@rjwysocki.net, vireshk@kernel.org, robh+dt@kernel.org,
	sboyd@kernel.org, nm@ti.com, daniel.lezcano@linaro.org,
	morten.rasmussen@arm.com, chris.redpath@arm.com,
	Ionela Voinescu <Ionela.Voinescu@arm.com>
Subject: Re: [PATCH v3 0/3] CPUFreq: Add support for cpu performance dependencies
Date: Wed, 4 Nov 2020 18:04:30 +0000	[thread overview]
Message-ID: <87558fa9-a4c6-38c9-bcc5-f736c0229f56@arm.com> (raw)
In-Reply-To: <20201103101840.yrgwmcjrnjn7n5q6@vireshk-i7>

Hi Viresh, thanks for looking into this.

On 11/3/20 10:18 AM, Viresh Kumar wrote:
> On 02-11-20, 12:01, Nicola Mazzucato wrote:
>> Hi All,
>>
>> In this V3 posting I have replaced the new dt-binding with minor changes/
>> improvements for opp (since we are now using opp tables instead).
>> The RFC still stands on how to make this info available to sw consumers.
>>
>> In the RFC, I am proposing a simple addition of a performance dependencies
>> cpumask in CPUFreq core and an example of how drivers and consumers would
>> make use of it.
>> I also propose an alternative approach, which does not require changes in
>> CPUFreq core, but - possibly - in all the consumers.
>>
>> This is to support systems where exposed cpu performance controls are more
>> fine-grained that the platform's ability to scale cpus independently.
> 
> I was talking to Vincent about what you are doing here and we got a
> bit confused and so here are few questions that we had:
> 
> - Based on my previous understanding, you don't want software
>   coordination of frequencies (which is done by cpufreq today), but
>   want the hardware to do that and so you want per-cpu cpufreq
>   policies.

Correct. And this has been done for quite some time in some platforms.

> 
> - What's the real benefit of hardware coordination ? Want to make sure
>   I fully understand that.

The hardware coordination that is coming out by having per-cpu cpufreq policies
is not new, and works just fine in most of the systems.

The benefit of having per-cpu controls is that the firmware will take care of
the performance of the entire system. It is purely a delegation to firmware for
the performance optimizations.

> 
> - Because of hardware co-ordination of otherwise co-ordinated CPUs,
>   few things break. Thermal and EAS are some of the examples and so
>   you are trying to fix them here by proving them the missing
>   information again.

Correct. And for this I have proposed two ways.

> 
> - One other thing that breaks with this is freq-invariance in the
>   scheduler, as the scheduler won't see the real frequencies the
>   various CPUs are running at. Most of the hardware we have today
>   doesn't have counters, like AMUs, not sure if all future ones based
>   on SCMI will have that too, so how are they gong to be fixed ?
> 

Correct. freq-invariance without counters is trying to do its best based on the
information it has available. It definitely relies on the knowledge of the v/f
domains to work at its best so I think in the case of per-cpu it will follow the
same approach as others being affected (EAS, thermal).

>   And if we even have to fix this (freq invariance), what's hardware
>   coordination giving us that makes all this worth it ?

I suppose this is more a generic question for all the platforms running with h/w
coordination, but for our case is that the f/w will take care of the performance
optimizations for us :)

> 
> Sorry about the long list :)

No problem at all. Thank you for your time on this and I hope I have made bits
clearer.

Nicola

> 

  reply	other threads:[~2020-11-04 18:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02 12:01 [PATCH v3 0/3] CPUFreq: Add support for cpu performance dependencies Nicola Mazzucato
2020-11-02 12:01 ` [PATCH v3 1/3] dt-bindings/opp: Update documentation for opp-shared Nicola Mazzucato
2020-11-02 12:01 ` [PATCH v3 2/3] opp/of: Allow empty opp-table with opp-shared Nicola Mazzucato
2020-11-03  5:01   ` Viresh Kumar
2020-11-04 17:54     ` Nicola Mazzucato
2020-11-05  4:41       ` Viresh Kumar
2020-11-16 11:45         ` Nicola Mazzucato
2020-11-02 12:01 ` [PATCH v3 3/3] [RFC] CPUFreq: Add support for cpu-perf-dependencies Nicola Mazzucato
2020-11-06  9:20   ` Viresh Kumar
2020-11-06 10:37     ` Lukasz Luba
2020-11-06 10:55       ` Viresh Kumar
2020-11-06 11:14         ` Lukasz Luba
2020-11-09  6:57           ` Viresh Kumar
2020-11-16 11:33             ` Lukasz Luba
2020-11-17 10:11               ` Viresh Kumar
2020-11-17 10:47                 ` Nicola Mazzucato
2020-11-17 10:53                   ` Viresh Kumar
2020-11-17 13:06                     ` Rafael J. Wysocki
2020-11-18  4:42                       ` Viresh Kumar
2020-11-18 12:00                         ` Rafael J. Wysocki
2020-11-19  6:40                           ` Viresh Kumar
2020-11-17 10:47                 ` Lukasz Luba
2020-11-17 10:55                   ` Viresh Kumar
2020-11-06  9:24   ` Viresh Kumar
2020-11-19  6:43   ` Viresh Kumar
2020-11-03 10:18 ` [PATCH v3 0/3] CPUFreq: Add support for cpu performance dependencies Viresh Kumar
2020-11-04 18:04   ` Nicola Mazzucato [this message]
2020-11-05 14:25     ` Vincent Guittot
2020-11-05 15:46       ` 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=87558fa9-a4c6-38c9-bcc5-f736c0229f56@arm.com \
    --to=nicola.mazzucato@arm.com \
    --cc=Ionela.Voinescu@arm.com \
    --cc=chris.redpath@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=vireshk@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).