[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <x49mx59b6c0.fsf@segfault.boston.devel.redhat.com>
Date: Tue, 15 May 2012 15:19:11 -0400
From: Jeff Moyer <jmoyer@...hat.com>
To: Lin Ming <ming.m.lin@...el.com>
Cc: Jens Axboe <axboe@...nel.dk>,
Alan Stern <stern@...land.harvard.edu>,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
linux-scsi@...r.kernel.org
Subject: Re: [RFC PATCH 3/3] block: add queue idle timer
Lin Ming <ming.m.lin@...el.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.
> @@ -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?
Cheers,
Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists