From: Vivek Goyal on
On Fri, Apr 09, 2010 at 07:35:35PM -0700, Divyesh Shah wrote:
> review comments.
> Changelog: (in response to Vivek Goyal's comments)
> o group blkiocg_update_blkio_group_dequeue_stats() with other DEBUG functions
> o rename blkiocg_update_set_active_queue_stats() to
> blkiocg_update_avg_queue_size_stats()
> o s/request/io/ in blkiocg_update_request_add_stats() and
> blkiocg_update_request_remove_stats()
> o Call cfq_del_timer() at request dispatch() instead of
> blkiocg_update_idle_time_stats()
> Signed-off-by: Divyesh Shah<dpshah(a)>
> ---

> @@ -2395,11 +2395,7 @@ static int cfq_dispatch_requests(struct request_queue *q, int force)
> }
> cfq_log_cfqq(cfqd, cfqq, "dispatched a request");
> - /*
> - * This is needed since we don't exactly match the mod_timer() and
> - * del_timer() calls in CFQ.
> - */
> - blkiocg_update_idle_time_stats(&cfqq->cfqg->blkg);
> + cfq_del_timer(cfqd, cfqq);

I am trying to think that why do we need this call here. What is that path
which does not delete the timer upon receiving request and lets fix that.

One of the possible path when you got the request but still leave the
timer on is following.


I guess we need to leave timer on so that if an unplug does not come in, a
timer expirty will dispatch the request from the queue.

In this case we can probably call here blkiocg_update_idle_time_stats()
directly. Anyway, that's the right thing to do otherwise our idle time
stats are little wrong as we got a request from the application and idle
timer is over. Now this is additional wait time enforced by cfq so that
lots of small requests are not dispatched to disk.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at