Re: [PATCH 09/12] Convert group_run_stats to use bytes instead of KiB/KB

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

 



On 22 December 2016 at 06:08, Robert Elliott <elliott@xxxxxxx> wrote:
> In group_run_stats, convert these fields:
> * io_kb (bytes transferred)
> * agg (aggregate average bandwidth)
> * min_bw
> * max_bw
>
> from tracking either KiB or KB depending on kb_base to simply tracking bytes.
> Rename io_kb to iobytes to match this new meaning.

It's hopefully unlikely but have you checked this change to see that
overflow isn't provoked during arithmetic? I spent a little while
getting rid of a few cases prior to this patch by using clang's
undefined behaviour sanitizer via -fsanitize=integer and they were
more likely to occur on 32 bit platforms (which was more of a pain as
linking the sanitizer on 32 bit x86 Linux was more difficult). Another
minor point is should the variable rename have gone to io_bytes rather
than iobytes?

> This will simplify computing quantities and bandwidth rates with both IEC
> binary and SI decimal unit prefixes (e.g., GiB/s and GB/s) in future patches.

-- 
Sitsofe | http://sucs.org/~sits/
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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