Re: [PATCH 1/7] PM / QoS: Prepare device structure for adding more constraint types

Rafael J. Wysocki
2012-10-10T23:08:37Z

On Tuesday 09 of October 2012 20:15:47 mark gross wrote:
> On Mon, Oct 08, 2012 at 10:04:03AM +0200, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > Currently struct dev_pm_info contains only one PM QoS constraints
> > pointer reserved for latency requirements. Since one more device
> > constraints type (i.e. flags) will be necessary, introduce a new
> > structure, struct dev_pm_qos, that eventually will contain all of
> > the available device PM QoS constraints and replace the "constraints"
> > pointer in struct dev_pm_info with a pointer to the new structure
> > called "qos".
> >
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > Reviewed-by: Jean Pihet <j-pihet@ti.com>
> > ---
> > drivers/base/power/qos.c | 42 ++++++++++++++++++++++--------------------
> > include/linux/pm.h | 2 +-
> > include/linux/pm_qos.h | 4 ++++
> > 3 files changed, 27 insertions(+), 21 deletions(-)
> >
> > Index: linux/include/linux/pm.h
> > ===================================================================
> > --- linux.orig/include/linux/pm.h
> > +++ linux/include/linux/pm.h
> > @@ -551,7 +551,7 @@ struct dev_pm_info {
> > struct dev_pm_qos_request *pq_req;
> > #endif
> > struct pm_subsys_data *subsys_data; /* Owned by the subsystem. */
> > - struct pm_qos_constraints *constraints;
> > + struct dev_pm_qos *qos;
> > };
> >
> > extern void update_pm_runtime_accounting(struct device *dev);
> > Index: linux/include/linux/pm_qos.h
> > ===================================================================
> > --- linux.orig/include/linux/pm_qos.h
> > +++ linux/include/linux/pm_qos.h
> > @@ -57,6 +57,10 @@ struct pm_qos_constraints {
> > struct blocking_notifier_head *notifiers;
> > };
> >
> > +struct dev_pm_qos {
> > + struct pm_qos_constraints latency;
> What about non-latency constraints? This pretty much makes it explicit
> that dev_pm_qos is all about latency. from the commit comment I thought
> you where trying to make it more genaric. Why not call "latency"
> "constraint" or something less specific?

Please see the next patches in the series that add one more constraint type.

Thanks,
Rafael

--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.