From: John OCallaghan <john.ocallaghan@s3group.com>
To: "Elliott, Robert (Server Storage)" <Elliott@hp.com>,
"fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: runtime and status-interval
Date: Tue, 19 Aug 2014 17:23:00 +0100 [thread overview]
Message-ID: <53F379E4.3030409@s3group.com> (raw)
In-Reply-To: <94D0CD8314A33A4D9D801C0FE68B402958C0C317@G9W0745.americas.hpqcorp.net>
Thanks Rob
I have made the suggested changes and these appear to be working OK.
John
On 18/08/14 20:54, Elliott, Robert (Server Storage) wrote:
>
>
>> -----Original Message-----
>> From: fio-owner@vger.kernel.org [mailto:fio-owner@vger.kernel.org] On
>> Behalf Of John OCallaghan
>> Sent: Friday, 15 August, 2014 11:55 AM
>> To: fio@vger.kernel.org
>> Subject: Re: runtime and status-interval
>>
>>
>>
>> FYI I found the problem in fio/backend.c. Seems to be working fine now.
>>
>>
>> The fix I put together is this:
>>
>> if (td_read(td) && td->io_bytes[DDIR_READ]) {
>> elapsed = utime_since_now(&td->start);
>> td->ts.runtime[DDIR_READ] += elapsed/1000;
>> }
>> if (td_write(td) && td->io_bytes[DDIR_WRITE]) {
>> elapsed = utime_since_now(&td->start);
>> td->ts.runtime[DDIR_WRITE] += elapsed/1000;
>> }
>> if (td_trim(td) && td->io_bytes[DDIR_TRIM]) {
>> elapsed = utime_since_now(&td->start);
>> td->ts.runtime[DDIR_TRIM] += elapsed/1000;
>> }
>
>
>>
>> The problem is is that runtime is holding milliseconds but
>> utime_since_now() returns microseconds. I added the "/1000" to make the
>> conversion.
>>
>> My change is a simple fix but quite possibly there are other places
>> within fio making the same mistake?
>
> These lines could just call mtime_since_now rather than utime_since_now.
>
> There's one more a few lines down:
> fio_gettime(&td->start, NULL);
>
> do_verify(td, verify_bytes);
>
> td->ts.runtime[DDIR_READ] += utime_since_now(&td->start);
>
>
> ---
> Rob Elliott HP Server Storage
>
>
>
>
-----
The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s). Please direct any additional queries to: communications@s3group.com. Thank You. Silicon and Software Systems Limited (S3 Group). Registered in Ireland no. 378073. Registered Office: South County Business Park, Leopardstown, Dublin 18.
prev parent reply other threads:[~2014-08-19 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-14 12:25 runtime and status-interval John OCallaghan
2014-08-15 16:54 ` John OCallaghan
2014-08-18 19:54 ` Elliott, Robert (Server Storage)
2014-08-19 16:23 ` John OCallaghan [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=53F379E4.3030409@s3group.com \
--to=john.ocallaghan@s3group.com \
--cc=Elliott@hp.com \
--cc=fio@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