From: Jens Axboe <axboe@kernel.dk>
To: Juan Casse <jcasse@chromium.org>
Cc: Grant Grundler <grundler@chromium.org>, fio@vger.kernel.org
Subject: Re: [PATCH] Add condition to stop issuing io in do_io().
Date: Mon, 16 Sep 2013 13:15:56 -0600 [thread overview]
Message-ID: <523758EC.8070502@kernel.dk> (raw)
In-Reply-To: <1379348530-2920-1-git-send-email-jcasse@chromium.org>
On 09/16/2013 10:22 AM, Juan Casse wrote:
> Problem:
> When specifying iodepth > 1 while doing random async io
> without a random map (and using the default random generator), the
> main while loop in do_io() will issue extra io in the amount of io
> allowed to accumulate in the queue. For example, a job with size=24k
> and bs=8k will perform 4 io instead of the expected 3.
>
> Reason:
> The above behavior occurs because the while loop in do_io()
> will continue until the amount of "completed io" >= size, but io
> in the queue are not accounted for because they have not been
> completed by io_u_queued_complete().
>
> Exceptions:
> The above behavior does not manifest itself when:
> using random_generator=lfsr bacause lfsr knows when to stop
> generating, and get_io_u() inside the while loop returns NULL,
> breaking out of the loop.
> using random map because random map ensures that all blocks
> are hit, and after they are all hit, no more are generated.
>
> Proposed Solution:
> Stop while loop based on bytes issued instead of bytes completed.
Looks good, applied.
--
Jens Axboe
prev parent reply other threads:[~2013-09-16 19:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 16:22 [PATCH] Add condition to stop issuing io in do_io() Juan Casse
2013-09-16 16:38 ` Grant Grundler
2013-09-16 19:15 ` Jens Axboe [this message]
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=523758EC.8070502@kernel.dk \
--to=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=grundler@chromium.org \
--cc=jcasse@chromium.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