lkml.org 
[lkml]   [2012]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 3/3] block: add queue idle timer
From
Date
On Tue, 2012-05-15 at 15:19 -0400, Jeff Moyer wrote:
> Lin Ming <ming.m.lin@intel.com> writes:
>
> > Add an idle timer that is set to some suitable timeout and would be
> > added when the queue first goes empty. If nothing has happened during
> > the timeout interval, then the queue is suspended.
> >
> > Queueing a new request could check the state and resume queue if it is
> > supended.
> >
>
> [snip]
>
> > @@ -1129,6 +1141,13 @@ void __blk_put_request(struct request_queue *q, struct request *req)
> > if (unlikely(--req->ref_count))
> > return;
> >
> > + /* PM request is not accounted */
> > + if (!(req->cmd_flags & REQ_PM)) {
> > + if (!(--q->nr_pending))
> > + /* Hard code to 20secs, will move to sysfs */
> > + mod_timer(&q->idle, jiffies + 20*HZ);
> > + }
> > +
>
> I'm pretty sure Jens wanted to avoid doing a mod_timer, here, given that
> the queue can transition between empty and non-empty fairly rapidly for
> dependent I/O.

I'll remove this idle timer and use runtime pm core's timer.

>
> > @@ -587,6 +590,13 @@ void __elv_add_request(struct request_queue *q, struct request *rq, int where)
> > {
> > trace_block_rq_insert(q, rq);
> >
> > + if (!(rq->cmd_flags & REQ_PM)) {
> > + if (!(q->pm_status != RPM_ACTIVE) &&
>
> Uhh, re-read that line. Not not equal?

Ah, it should be:

if (q->pm_status != RPM_ACTIVE &&
My mistake.

>
> Cheers,
> Jeff




\
 
 \ /
  Last update: 2012-05-16 04:01    [W:0.187 / U:0.408 seconds]
©2003-2014 Jasper Spaans. Advertise on this site