Re: [PATCH 2/2] PM: sleep: Fix runtime PM based cpuidle support

Ulf Hansson
2021-10-21T18:49:52Z

[...]

> > The PM-runtime case should be addressed directly IMO, we only need to
> > figure out how to do that.
> >
> > I'm wondering how you are dealing with the case when user space
> > prevents pd_dev from suspending via sysfs, for that matter.
>
> Or what happens if rpm_suspend() returns -EAGAIN, because someone has
> started to resume the device right after its reference counter went
> down to 0.

That would mean that the pm_runtime_put_sync() call fails to runtime
suspend the device. In other words, the corresponding genpd stays
powered on, which prevents idle states from being selected by the
genpd governor.

So, yes, this should work fine.

>
> It looks to me like the problem is there regardless of the whole
> interference with system suspend.

I don't think so, but I may be overlooking some points.

Kind regards
Uffe