linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Linux PM <linux-pm@vger.kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Kevin Hilman <khilman@kernel.org>,
	Lina Iyer <ilina@codeaurora.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	"Raju P . L . S . S . S . N" <rplsssn@codeaurora.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v10 00/27] PM / Domains: Support hierarchical CPU arrangement (PSCI/ARM)
Date: Thu, 17 Jan 2019 17:44:10 +0000	[thread overview]
Message-ID: <20190117174410.GA8839@e107155-lin> (raw)
In-Reply-To: <CAPDyKFp-JB85TZOs+oso0iidaAsm1A=UDrg=gv+QZ4VJ9gW=fA@mail.gmail.com>

On Wed, Jan 16, 2019 at 10:10:08AM +0100, Ulf Hansson wrote:
> On Thu, 3 Jan 2019 at 13:06, Sudeep Holla <sudeep.holla@arm.com> wrote:
> >
> > On Thu, Nov 29, 2018 at 06:46:33PM +0100, Ulf Hansson wrote:
> > > Over the years this series have been iterated and discussed at various Linux
> > > conferences and LKML. In this new v10, a quite significant amount of changes
> > > have been made to address comments from v8 and v9. A summary is available
> > > below, although let's start with a brand new clarification of the motivation
> > > behind this series.
> >
> > I would like to raise few points, not blockers as such but need to be
> > discussed and resolved before proceeding further.
> > 1. CPU Idle Retention states
> >         - How will be deal with flattening (which brings back the DT bindings,
> >           i.e. do we have all we need) ? Because today there are no users of
> >           this binding yet. I know we all agreed and added after LPC2017 but
> >           I am not convinced about flattening with only valid states.
>
> Not exactly sure I understand what you are concerned about here. When
> it comes to users of the new DT binding, I am converting two new
> platforms in this series to use of it.
>

Yes that's exactly my concern. So if someone updates DT(since it's part
of the kernel still), but don't update the firmware(for complexity reasons)
the end result on those platform is broken CPUIdle which is a regression/
feature break and that's what I am objecting here.

> Note, the flattened model is still a valid option to describe the CPU
> idle states after these changes. Especially when there are no last man
> standing activities to manage by Linux and no shared resource that
> need to prevent cluster idle states, when it's active.

Since OSI vs PC is discoverable, we shouldn't tie up with DT in anyway.

>
> >         - Will domain governor ensure not to enter deeper idles states based
> >           on its sub-domain states. E.g.: when CPUs are in retention, so
> >           called container/cluster domain can enter retention or below and not
> >           power off states.
>
> I have tried to point this out as a known limitation in genpd of the
> current series, possibly I have failed to communicate that clearly.
> Anyway, I fully agree that this needs to be addressed in a future
> step.
>

Sorry, I might have missed to read. The point is if we are sacrificing
few retention states with this new feature, I am sure PC would perform
better that OSI on platforms which has retention states. Another
reason for having comparison data or we should simply assume and state
clearly OSI may perform bad on such system until the support is added.

> Note that, this isn't a specific limitation to how idle states are
> selected for CPUs and CPU clusters by genpd, but is rather a
> limitation to any hierarchical PM domain topology managed by genpd
> that has multiple idle states.
>

Agreed, but with flattened mode we compile the list of valid states so
the limitation is automatically eliminated.

> Do note, I already started hacking on this and intend to post patches
> on top of this series, as these changes isn't needed for those two
> ARM64 platforms I have deployed support for.
>

Good to know.

> >         - Is the case of not calling cpu_pm_{enter,exit} handled now ?
>
> It is still called, so no changes in regards to that as apart of this series.
>

OK, so I assume for now we are not going to support retention states with OSI
for now ?

> When it comes to actually manage the "last man activities" as part of
> selecting an idle state of the cluster, that is going to be addressed
> on top as "optimizations".
>

OK

> In principle we should not need to call cpu_pm_enter|exit() in the
> idle path at all,

Not sure if we can do that. We need to notify things like PMU, FP, GIC
which have per cpu context too and not just "cluster" context.

> but rather only cpu_cluster_pm_enter|exit() when a cluster idle state is
> selected.

We need to avoid relying on concept of "cluster" and just think of power
domains and what's hanging on those domains. Sorry for naive question, but
does genpd have concept of notifiers. I do understand that it's more
bottom up approach where each entity in genpd saves the context and requests
to enter a particular state. But with CPU devices like GIC/VFP/PMU, it
needs to be more top down approach where CPU genpd has to enter a enter
so it notifies the devices attached to it to save it's context. Not ideal
but that's current solution. Because with the new DT bindings, platforms
can express if PMU/GIC is in per cpu domain or any pd in the hierarchy and
we ideally need to honor that. But that's optimisation, just mentioning.

> That should improve latency when
> selecting an idle state for a CPU. However, to reach that point
> additional changes are needed in various drivers, such as the gic
> driver for example.
>

Agreed.

> >
> > 2. Now that we have SDM845 which may soon have platform co-ordinated idle
> >    support in mainline, I *really* would like to see some power comparison
> >    numbers(i.e. PC without cluster idle states). This has been the main theme
> >    for most of the discussion on this topic for years and now we are close
> >    to have some platform, we need to try.
>
> I have quite recently been talking to Qcom folkz about this as well,
> but no commitments are made.
>

Indeed that's the worrying. IMO, this is requested since day#1 and not
even simple interest is shown, but that's another topic.

> Although I fully agree that some comparison would be great, it still
> doesn't matter much, as we anyway need to support PSCI OSI mode in
> Linux. Lorenzo have agreed to this as well.
>

OK, I am fine if others agree. Since we are sacrificing on few (retention)
states that might disappear with OSI, I am still very much still interested
as OSI might perform bad that PC especially in such cases.

> >
> > 3. Also, after adding such complexity, we really need a platform with an
> >    option to build and upgrade firmware easily. This will help to prevent
> >    this being not maintained for long without a platform to test, also
> >    avoid adding lots of quirks to deal with broken firmware so that newer
> >    platforms deal those issues in the firmware correctly.
>
> I don't see how this series change anything from what we already have
> today with the PSCI FW. No matter of OSI or PC mode is used, there are
> complexity involved.
>

I agree, but PC is already merged, mainitained and well tested regularly
as it's default mode that must be supported and TF-A supports/maintains
that. OSI is new and is on platform which may not have much commitments
and can be thrown away and any bugs we find in future many need to worked
around in kernel. That's what I meant as worrying.

> Although, of course I agree with you, that we should continue to try
> to convince ARM vendors about moving to the public version of ATF and
> avoid proprietary FW binaries as much as possible.
>

Indeed.

--
Regards,
Sudeep

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

  reply	other threads:[~2019-01-17 17:44 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29 17:46 [PATCH v10 00/27] PM / Domains: Support hierarchical CPU arrangement (PSCI/ARM) Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 01/27] PM / Domains: Add generic data pointer to genpd_power_state struct Ulf Hansson
2018-12-18 10:39   ` Daniel Lezcano
2018-12-18 11:53     ` Ulf Hansson
2019-01-11 10:52       ` Rafael J. Wysocki
2018-11-29 17:46 ` [PATCH v10 02/27] PM / Domains: Add support for CPU devices to genpd Ulf Hansson
2018-12-19  9:53   ` Daniel Lezcano
2018-12-19 10:02     ` Ulf Hansson
2019-01-11 10:54       ` Rafael J. Wysocki
2018-11-29 17:46 ` [PATCH v10 03/27] timer: Export next wakeup time of a CPU Ulf Hansson
2019-01-11 11:06   ` Rafael J. Wysocki
2019-01-16  7:57     ` Ulf Hansson
2019-01-16 10:59       ` Rafael J. Wysocki
2019-01-16 12:00         ` Ulf Hansson
2019-01-25 10:04           ` Ulf Hansson
2019-01-25 10:18             ` Rafael J. Wysocki
2018-11-29 17:46 ` [PATCH v10 04/27] PM / Domains: Add genpd governor for CPUs Ulf Hansson
2018-12-19  9:54   ` Daniel Lezcano
2018-12-19 10:09     ` Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 05/27] dt: psci: Update DT bindings to support hierarchical PSCI states Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 06/27] of: base: Add of_get_cpu_state_node() to get idle states for a CPU node Ulf Hansson
2018-12-19 11:05   ` Daniel Lezcano
2018-11-29 17:46 ` [PATCH v10 07/27] cpuidle: dt: Support hierarchical CPU idle states Ulf Hansson
2018-12-19 11:20   ` Daniel Lezcano
2018-11-29 17:46 ` [PATCH v10 08/27] ARM/ARM64: cpuidle: Let back-end init ops take the driver as input Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 09/27] drivers: firmware: psci: Move psci to separate directory Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 10/27] MAINTAINERS: Update files for PSCI Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 11/27] drivers: firmware: psci: Split psci_dt_cpu_init_idle() Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 12/27] drivers: firmware: psci: Simplify state node parsing Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 13/27] drivers: firmware: psci: Support hierarchical CPU idle states Ulf Hansson
2018-12-19 12:11   ` Daniel Lezcano
2018-12-19 12:53     ` Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 14/27] drivers: firmware: psci: Simplify error path of psci_dt_init() Ulf Hansson
2018-12-19 12:08   ` Daniel Lezcano
2018-11-29 17:46 ` [PATCH v10 15/27] drivers: firmware: psci: Announce support for OS initiated suspend mode Ulf Hansson
2018-12-20 13:11   ` Daniel Lezcano
2018-11-29 17:46 ` [PATCH v10 16/27] drivers: firmware: psci: Prepare to use " Ulf Hansson
2018-12-20 14:08   ` Daniel Lezcano
2018-12-20 15:41     ` Ulf Hansson
2018-12-20 17:16       ` Daniel Lezcano
2018-11-29 17:46 ` [PATCH v10 17/27] drivers: firmware: psci: Prepare to support PM domains Ulf Hansson
2018-12-20 14:19   ` Daniel Lezcano
2018-12-20 15:49     ` Ulf Hansson
2018-12-20 18:06       ` Daniel Lezcano
2018-12-20 21:37         ` Ulf Hansson
2018-12-21  7:15           ` Daniel Lezcano
2018-11-29 17:46 ` [PATCH v10 18/27] drivers: firmware: psci: Add support for PM domains using genpd Ulf Hansson
2018-12-03 16:37   ` Lina Iyer
2018-12-03 20:03     ` Ulf Hansson
2018-12-20 14:35   ` Daniel Lezcano
2018-12-20 21:09     ` Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 19/27] drivers: firmware: psci: Add hierarchical domain idle states converter Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 20/27] drivers: firmware: psci: Introduce psci_dt_topology_init() Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 21/27] drivers: firmware: psci: Add a helper to attach a CPU to its PM domain Ulf Hansson
2018-12-04 18:45   ` Lina Iyer
2018-12-06  9:15     ` Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 22/27] drivers: firmware: psci: Attach the CPU's device " Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 23/27] drivers: firmware: psci: Manage runtime PM in the idle path for CPUs Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 24/27] drivers: firmware: psci: Support CPU hotplug for the hierarchical model Ulf Hansson
2018-11-29 22:31   ` Lina Iyer
2018-11-30  8:25     ` Ulf Hansson
2018-11-30 20:57       ` Lina Iyer
2018-12-19 11:17   ` Lorenzo Pieralisi
2018-12-19 11:47     ` Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 25/27] arm64: kernel: Respect the hierarchical CPU topology in DT for PSCI Ulf Hansson
2018-11-29 17:46 ` [PATCH v10 26/27] arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916 Ulf Hansson
2018-11-29 17:47 ` [PATCH v10 27/27] arm64: dts: hikey: Convert to the hierarchical CPU topology layout Ulf Hansson
2018-12-17 16:12 ` [PATCH v10 00/27] PM / Domains: Support hierarchical CPU arrangement (PSCI/ARM) Ulf Hansson
2019-01-11 11:08   ` Rafael J. Wysocki
2019-01-03 12:06 ` Sudeep Holla
2019-01-16  9:10   ` Ulf Hansson
2019-01-17 17:44     ` Sudeep Holla [this message]
2019-01-18 11:56       ` Ulf Hansson

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=20190117174410.GA8839@e107155-lin \
    --to=sudeep.holla@arm.com \
    --cc=Lorenzo.Pieralisi@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=geert+renesas@glider.be \
    --cc=ilina@codeaurora.org \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=rplsssn@codeaurora.org \
    --cc=sboyd@kernel.org \
    --cc=tony@atomide.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.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).