From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [PATCH 1/7] PM / QoS: Prepare device structure for adding more constraint types Date: Thu, 11 Oct 2012 01:12:04 +0200 Message-ID: <1768451.HPQmsTHsyu@vostro.rjw.lan> References: <201209282351.10663.rjw@sisk.pl> <5823653.QdHL6Lda2x@vostro.rjw.lan> <20121010031547.GA21067@MGROSS-X220VM> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: <20121010031547.GA21067@MGROSS-X220VM> Sender: linux-pci-owner@vger.kernel.org To: markgross@thegnar.org Cc: Linux PM list , ACPI Devel Mailing List , Alan Stern , Huang Ying , Sarah Sharp , Lan Tianyu , Aaron Lu , Jean Pihet , linux-pci@vger.kernel.org, Greg Kroah-Hartman , LKML List-Id: linux-acpi@vger.kernel.org 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 > > > > 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 > > Reviewed-by: Jean Pihet > > --- > > 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.