mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Corrado Zoccolo <czoccolo@gmail.com>
To: Jens Axboe <jens.axboe@oracle.com>,
	Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: bug in elevator/cfq regarding start_time?
Date: Sun, 4 Oct 2009 22:54:44 +0200	[thread overview]
Message-ID: <4e5e476b0910041354o54c95626g974264976adaf53c@mail.gmail.com> (raw)

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
--------------------------------------------------------------------------

             reply	other threads:[~2009-10-04 20:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-04 20:54 Corrado Zoccolo [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e5e476b0910041354o54c95626g974264976adaf53c@mail.gmail.com \
    --to=czoccolo@gmail.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®