From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: MyungJoo Ham <myungjoo.ham@gmail.com>
Cc: markgross@thegnar.org, linux-pm@vger.kernel.org,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
Kevin Hilman <khilman@ti.com>, Jean Pihet <j-pihet@ti.com>,
kyungmin.park@samsung.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] PM / QoS: add pm_qos_update_request_timeout API
Date: Mon, 26 Mar 2012 22:42:39 +0200 [thread overview]
Message-ID: <201203262242.40177.rjw@sisk.pl> (raw)
In-Reply-To: <CAJ0PZbThSc=WkmeOYtykTKZ7bhBHJa7KYYPeWPLNy_suCD0f+A@mail.gmail.com>
On Monday, March 26, 2012, MyungJoo Ham wrote:
> On Mon, Mar 26, 2012 at 12:02 PM, mark gross <markgross@thegnar.org> wrote:
> > 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
> >
>
>
> For the current structure of Linux (scheduling task, jiffies), I
> thought that none of the two is better than the another because the
> duration should not be so long and the jiffies are larger than 1 ms.
>
> However, it turns out to be not true: some uses jiffies < 1ms (alpha),
> some uses jiffies not cleanly dividable with msecs (omap). Thus, it
> appears that usecs is better. Thus, the parameter should be usecs
> rather than msecs.
Yes, usecs are generally better, although you may consider using nsecs too.
Thanks,
Rafael
next prev parent reply other threads:[~2012-03-26 20:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-14 5:16 [RFC PATCH] PM / QoS: add pm_qos_update_request_timeout API MyungJoo Ham
2012-02-14 22:08 ` Rafael J. Wysocki
2012-02-15 6:44 ` MyungJoo Ham
2012-02-19 21:14 ` mark gross
2012-02-22 8:43 ` MyungJoo Ham
2012-02-29 4:56 ` [PATCH v2] " MyungJoo Ham
2012-03-07 5:06 ` [PATCH v3] " MyungJoo Ham
2012-03-24 16:35 ` mark gross
2012-03-26 1:41 ` MyungJoo Ham
2012-03-26 3:02 ` mark gross
2012-03-26 11:57 ` MyungJoo Ham
2012-03-26 20:42 ` Rafael J. Wysocki [this message]
2012-03-27 6:31 ` [PATCH v4] " MyungJoo Ham
2012-03-27 22:03 ` Rafael J. Wysocki
2012-03-28 1:47 ` [PATCH v4 resend] " MyungJoo Ham
2012-03-28 21:55 ` Rafael J. Wysocki
2012-03-28 1:53 ` [PATCH v4] " MyungJoo Ham
2012-03-28 10:25 ` Rafael J. Wysocki
2012-03-24 16:41 ` [PATCH v3] " mark gross
2012-03-24 18:37 ` mark gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201203262242.40177.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=j-pihet@ti.com \
--cc=khilman@ti.com \
--cc=kyungmin.park@samsung.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=markgross@thegnar.org \
--cc=myungjoo.ham@gmail.com \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox