Re: [RFC][PATCH 1/3] PM / sleep: Flag to speed up suspend-resume of runtime-suspended devices

From: Alan Stern
Date: Thu May 08 2014 - 10:36:31 EST


On Thu, 8 May 2014, Ulf Hansson wrote:

> >> Should we not depend on PM_RUNTIME only? Thus we don't need the new
> >> Kconfig,
> >
> > Well, OK. I guess we can tolerate one useless statement in rpm_resume()
> > in case CONFIG_PM_SLEEP is unset.

It isn't a big deal. However, Ulf, you need to understand that this
API belongs to _both_ PM_SLEEP _and_ PM_RUNTIME. It doesn't mean
anything unless both are present.

But as Rafael said, the extra overhead if !CONFIG_PM_SLEEP is minimal.
(Although I would move the new flag to be next to the other bitflags,
so that it doesn't add an entire extra word to the dev_pm_info
structure.)

> >> and then we could rename the new APIs to pm_runtime_* instead.
> >
> > That would just make the name longer - for what value?
>
> Only "__set_leave_runtime_suspended" will be a bit longer.
>
> The idea I had was to clearly indicate, these functions is a part of
> PM_RUNTIME API.

Not so. They are part of both PM_SLEEP and PM_RUNTIME, which means
they are really just part of PM. You can tell by the fact that they
are used in both main.c and runtime.c.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/