RE: runtime and status-interval

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: fio-owner@xxxxxxxxxxxxxxx [mailto:fio-owner@xxxxxxxxxxxxxxx] On
> Behalf Of John OCallaghan
> Sent: Friday, 15 August, 2014 11:55 AM
> To: fio@xxxxxxxxxxxxxxx
> 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




��.n��������+%������w��{.n�������^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux