linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bug in elevator/cfq regarding start_time?
@ 2009-10-04 20:54 Corrado Zoccolo
  2009-10-04 20:59 ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Corrado Zoccolo @ 2009-10-04 20:54 UTC (permalink / raw)
  To: Jens Axboe, Linux-Kernel

Hi Jens,
I found that the start_time is not monotonic in the cfqq fifo_list.
The problem seems to be that:
* attempt_merge overrides one of the start_time:
        if (time_after(req->start_time, next->start_time))
                req->start_time = next->start_time;
* then it calls elv_merge_requests, that in turn invokes cfq's
elevator_merge_req_fn, i.e. cfq_merged_requests
* cfq_merged_requests checks start_times to decide whether requests
need to be repositioned
        if (!list_empty(&rq->queuelist) && !list_empty(&next->queuelist) &&
            time_before(next->start_time, rq->start_time))
                list_move(&rq->queuelist, &next->queuelist);

Other I/O schedulers are not affected, since none of them uses
start_time explicitly, but they have a copy in one of the private
fields.

Corrado

-- 
__________________________________________________________________________

dott. Corrado Zoccolo                          mailto:czoccolo@gmail.com
PhD - Department of Computer Science - University of Pisa, Italy
--------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-10-06  8:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-04 20:54 bug in elevator/cfq regarding start_time? Corrado Zoccolo
2009-10-04 20:59 ` Jens Axboe
2009-10-05 15:08   ` Corrado Zoccolo
2009-10-05 20:26     ` Corrado Zoccolo
2009-10-06  7:12       ` Jens Axboe
2009-10-06  8:43         ` Corrado Zoccolo
2009-10-06  8:54           ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).