Messages in this thread | | | Date | Sun, 25 Mar 2012 20:02:39 -0700 | From | mark gross <> | Subject | Re: [PATCH v3] PM / QoS: add pm_qos_update_request_timeout API |
| |
On Mon, Mar 26, 2012 at 10:41:15AM +0900, MyungJoo Ham wrote: > On Sun, Mar 25, 2012 at 1:35 AM, mark gross <markgross@thegnar.org> wrote: > > I apologize for the lat replay and admit that I was probably wrong to > > oppose the idea of time out pm_qos requests. (last week we bumped into > > a need for them and now I get it.) > > > > > > On Wed, Mar 07, 2012 at 02:06:18PM +0900, MyungJoo Ham wrote: > >> The new API, pm_qos_update_request_timeout() is to provide a timeout > >> with pm_qos_update_request. > >> > >> For example, pm_qos_update_request_timeout(req, 100, 1000), means that > >> QoS request on req with value 100 will be active for 1000 jiffies. > >> After 1000 jiffies, the QoS request thru req is rolled back to the > >> request status when pm_qos_update_request_timeout() was called. If there > >> were another pm_qos_update_request(req, x) during the 1000 jiffies, this > >> new request with value x will override as this is another request on the > >> same req handle. A new request on the same req handle will always > >> override the previous request whether it is the conventional request or > >> it is the new timeout request. > >> > >> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> > >> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> > [] > >> @@ -77,6 +79,8 @@ void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class, > >> s32 value); > >> void pm_qos_update_request(struct pm_qos_request *req, > >> s32 new_value); > >> +void pm_qos_update_request_timeout(struct pm_qos_request *req, > >> + s32 new_value, unsigned long timeout_ms); > > is ms the right units? could we ever need us? > > > > Because jiffies are used for scheduling tasks, I thought ms should be > fine and having some devices running fast for some msecs longer won't > hurt. However, do you expect scheduling tasks or jiffies may use usecs > later? I don't mind using usecs instead of msecs here; thus, I'll > update this to use usecs. I'll resend patchset soon. >
I am just asking a question. I'm not sure if us or ms are the better units off the top of my head.
--mark
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |