mbox series

[0/6] pmdomain/cpuidle-psci: Support s2idle/s2ram on PREEMPT_RT

Message ID 20240429140531.210576-1-ulf.hansson@linaro.org (mailing list archive)
Headers show
Series pmdomain/cpuidle-psci: Support s2idle/s2ram on PREEMPT_RT | expand

Message

Ulf Hansson April 29, 2024, 2:05 p.m. UTC
The hierarchical PM domain topology and the corresponding domain-idle-states
are currently disabled on a PREEMPT_RT based configuration. The main reason is
because spinlocks are turned into sleepable locks on PREEMPT_RT, which means
genpd and runtime PM can't be use in the atomic idle-path when
selecting/entering an idle-state.

For s2idle/s2ram this is an unnecessary limitation that this series intends to
address. Note that, the support for cpuhotplug is left to future improvements.
More information about this are available in the commit messages.

I have tested this on a Dragonboard 410c.

Kind regards
Ulf Hansson


Ulf Hansson (6):
  pmdomain: core: Enable s2idle for CPU PM domains on PREEMPT_RT
  pmdomain: core: Don't hold the genpd-lock when calling
    dev_pm_domain_set()
  cpuidle: psci-domain: Enable system-wide suspend on PREEMPT_RT
  cpuidle: psci: Drop redundant assignment of CPUIDLE_FLAG_RCU_IDLE
  cpuidle: psci: Enable the hierarchical topology for s2ram on
    PREEMPT_RT
  cpuidle: psci: Enable the hierarchical topology for s2idle on
    PREEMPT_RT

 drivers/cpuidle/cpuidle-psci-domain.c | 10 ++++--
 drivers/cpuidle/cpuidle-psci.c        | 26 +++++++++-----
 drivers/pmdomain/core.c               | 52 +++++++++++++++++++++++++--
 include/linux/pm_domain.h             |  5 ++-
 4 files changed, 77 insertions(+), 16 deletions(-)

Comments

Sebastian Andrzej Siewior April 30, 2024, 9:44 a.m. UTC | #1
On 2024-04-29 16:05:25 [+0200], Ulf Hansson wrote:
> The hierarchical PM domain topology and the corresponding domain-idle-states
> are currently disabled on a PREEMPT_RT based configuration. The main reason is
> because spinlocks are turned into sleepable locks on PREEMPT_RT, which means
> genpd and runtime PM can't be use in the atomic idle-path when
> selecting/entering an idle-state.
> 
> For s2idle/s2ram this is an unnecessary limitation that this series intends to
> address. Note that, the support for cpuhotplug is left to future improvements.
> More information about this are available in the commit messages.
> 
> I have tested this on a Dragonboard 410c.

Have you tested this with PREEMPT_RT enabled and if so, which kernel?

> Kind regards
> Ulf Hansson

Sebastian
Ulf Hansson April 30, 2024, 10:42 a.m. UTC | #2
On Tue, 30 Apr 2024 at 11:44, Sebastian Andrzej Siewior
<bigeasy@linutronix.de> wrote:
>
> On 2024-04-29 16:05:25 [+0200], Ulf Hansson wrote:
> > The hierarchical PM domain topology and the corresponding domain-idle-states
> > are currently disabled on a PREEMPT_RT based configuration. The main reason is
> > because spinlocks are turned into sleepable locks on PREEMPT_RT, which means
> > genpd and runtime PM can't be use in the atomic idle-path when
> > selecting/entering an idle-state.
> >
> > For s2idle/s2ram this is an unnecessary limitation that this series intends to
> > address. Note that, the support for cpuhotplug is left to future improvements.
> > More information about this are available in the commit messages.
> >
> > I have tested this on a Dragonboard 410c.
>
> Have you tested this with PREEMPT_RT enabled and if so, which kernel?

Yes, of course. :-) I should have mentioned this in the cover-letter, sorry.

I have used the linux-rt-devel.git, which had a branch based upon
v6.8-rc7 a while ago, that I used when I did my tests.

The series needed a small rebase on top of my linux-pm tree [1],
before I could post it though. I also tested the rebased series, but
then of course then not with PREEMPT_RT, but to make sure there are no
regressions.

Kind regards
Uffe

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git next