From: Jens Axboe <jens.axboe@oracle.com>
To: Radha Ramachandran <radha@google.com>
Cc: fio@vger.kernel.org
Subject: Re: Alter the order of checking time exceeded vs getting an io_u
Date: Tue, 16 Jun 2009 08:30:22 +0200 [thread overview]
Message-ID: <20090616063022.GJ11363@kernel.dk> (raw)
In-Reply-To: <66dfd3fe0906151618r472be916ubfb771d714cc851f@mail.gmail.com>
On Mon, Jun 15 2009, Radha Ramachandran wrote:
> Hi,
> I was hitting a case where fio would loop for ever even though the
> runtime was exceeded if it had difficulty getting the io_u struct, so
> I suggest this change to the code so it wld not loop forever:
Looks sane, applied. Thanks!
>
> >git diff
> diff --git a/fio.c b/fio.c
> index bb26062..4927f1c 100644
> --- a/fio.c
> +++ b/fio.c
> @@ -442,18 +442,17 @@ static void do_verify(struct thread_data *td)
> while (!td->terminate) {
> int ret2, full;
>
> - io_u = __get_io_u(td);
> - if (!io_u)
> - break;
> -
> update_tv_cache(td);
>
> if (runtime_exceeded(td, &td->tv_cache)) {
> - put_io_u(td, io_u);
> td->terminate = 1;
> break;
> }
>
> + io_u = __get_io_u(td);
> + if (!io_u)
> + break;
> +
> if (get_next_verify(td, io_u)) {
> put_io_u(td, io_u);
> break;
> @@ -580,18 +579,17 @@ static void do_io(struct thread_data *td)
> if (td->terminate)
> break;
>
> - io_u = get_io_u(td);
> - if (!io_u)
> - break;
> -
> update_tv_cache(td);
>
> if (runtime_exceeded(td, &td->tv_cache)) {
> - put_io_u(td, io_u);
> td->terminate = 1;
> break;
> }
>
> + io_u = get_io_u(td);
> + if (!io_u)
> + break;
> +
> /*
> * Add verification end_io handler, if asked to verify
> * a previously written file.
>
>
> thanks
> -radha
> --
> To unsubscribe from this list: send the line "unsubscribe fio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Jens Axboe
prev parent reply other threads:[~2009-06-16 6:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 23:18 Alter the order of checking time exceeded vs getting an io_u Radha Ramachandran
2009-06-16 6:30 ` 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=20090616063022.GJ11363@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=fio@vger.kernel.org \
--cc=radha@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.