lkml.org 
[lkml]   [2009]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/20] io-controller: Common flat fair queuing code in elevaotor layer
Vivek Goyal wrote:
...
> +
> +/*
> + * Do the accounting. Determine how much service (in terms of time slices)
> + * current queue used and adjust the start, finish time of queue and vtime
> + * of the tree accordingly.
> + *
> + * Determining the service used in terms of time is tricky in certain
> + * situations. Especially when underlying device supports command queuing
> + * and requests from multiple queues can be there at same time, then it
> + * is not clear which queue consumed how much of disk time.
> + *
> + * To mitigate this problem, cfq starts the time slice of the queue only
> + * after first request from the queue has completed. This does not work
> + * very well if we expire the queue before we wait for first and more
> + * request to finish from the queue. For seeky queues, we will expire the
> + * queue after dispatching few requests without waiting and start dispatching
> + * from next queue.
> + *
> + * Not sure how to determine the time consumed by queue in such scenarios.
> + * Currently as a crude approximation, we are charging 25% of time slice
> + * for such cases. A better mechanism is needed for accurate accounting.
> + */

Hi Vivek,

The comment is out of date, would you update it accordingly?

> +void __elv_ioq_slice_expired(struct request_queue *q, struct io_queue *ioq)
> +{
> + struct elv_fq_data *efqd = &q->elevator->efqd;
> + struct io_entity *entity = &ioq->entity;
> + long slice_unused = 0, slice_used = 0, slice_overshoot = 0;
> +
> + assert_spin_locked(q->queue_lock);
> + elv_log_ioq(efqd, ioq, "slice expired");
> +
> + if (elv_ioq_wait_request(ioq))
> + del_timer(&efqd->idle_slice_timer);
> +
> + elv_clear_ioq_wait_request(ioq);
> +
> + /*

--
Regards
Gui Jianfeng



\
 
 \ /
  Last update: 2009-06-30 08:43    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site