stat: update description of clat accounting in stat.h
authorVincent Fu <vincent.fu@wdc.com>
Mon, 9 Oct 2017 14:47:11 +0000 (10:47 -0400)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Oct 2017 15:09:53 +0000 (09:09 -0600)
The description in stat.h of the data structure used for
storing completion latency percentiles had not been updated
to reflect the transition to nanosecond timing. This patch
updates the description to be consistent with the nanosecond
changes. There have been a few instances on github and the
mailing list where this had caused confusion.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
stat.h

diff --git a/stat.h b/stat.h
index 848331bb5e47fef2438cf19a910fed5c02b712bc..3fda084156bbfb984d34985e686a33ad3bb44082 100644 (file)
--- a/stat.h
+++ b/stat.h
@@ -23,6 +23,16 @@ struct group_run_stats {
 #define FIO_IO_U_LAT_U_NR 10
 #define FIO_IO_U_LAT_M_NR 12
 
 #define FIO_IO_U_LAT_U_NR 10
 #define FIO_IO_U_LAT_M_NR 12
 
+/*
+ * Constants for clat percentiles
+ */
+#define FIO_IO_U_PLAT_BITS 6
+#define FIO_IO_U_PLAT_VAL (1 << FIO_IO_U_PLAT_BITS)
+#define FIO_IO_U_PLAT_GROUP_NR 29
+#define FIO_IO_U_PLAT_NR (FIO_IO_U_PLAT_GROUP_NR * FIO_IO_U_PLAT_VAL)
+#define FIO_IO_U_LIST_MAX_LEN 20 /* The size of the default and user-specified
+                                       list of percentiles */
+
 /*
  * Aggregate clat samples to report percentile(s) of them.
  *
 /*
  * Aggregate clat samples to report percentile(s) of them.
  *
@@ -34,7 +44,7 @@ struct group_run_stats {
  *
  * FIO_IO_U_PLAT_GROUP_NR and FIO_IO_U_PLAT_BITS determine the maximum
  * range being tracked for latency samples. The maximum value tracked
  *
  * FIO_IO_U_PLAT_GROUP_NR and FIO_IO_U_PLAT_BITS determine the maximum
  * range being tracked for latency samples. The maximum value tracked
- * accurately will be 2^(GROUP_NR + PLAT_BITS -1) microseconds.
+ * accurately will be 2^(GROUP_NR + PLAT_BITS - 1) nanoseconds.
  *
  * FIO_IO_U_PLAT_GROUP_NR and FIO_IO_U_PLAT_BITS determine the memory
  * requirement of storing those aggregate counts. The memory used will
  *
  * FIO_IO_U_PLAT_GROUP_NR and FIO_IO_U_PLAT_BITS determine the memory
  * requirement of storing those aggregate counts. The memory used will
@@ -98,22 +108,15 @@ struct group_run_stats {
  *     3       8       2               [256,511]               64
  *     4       9       3               [512,1023]              64
  *     ...     ...     ...             [...,...]               ...
  *     3       8       2               [256,511]               64
  *     4       9       3               [512,1023]              64
  *     ...     ...     ...             [...,...]               ...
- *     18      23      17              [8838608,+inf]**        64
+ *     28      33      27              [8589934592,+inf]**     64
  *
  *  * Special cases: when n < (M-1) or when n == (M-1), in both cases,
  *    the value cannot be rounded off. Use all bits of the sample as
  *    index.
  *
  *
  *  * Special cases: when n < (M-1) or when n == (M-1), in both cases,
  *    the value cannot be rounded off. Use all bits of the sample as
  *    index.
  *
- *  ** If a sample's MSB is greater than 23, it will be counted as 23.
+ *  ** If a sample's MSB is greater than 33, it will be counted as 33.
  */
 
  */
 
-#define FIO_IO_U_PLAT_BITS 6
-#define FIO_IO_U_PLAT_VAL (1 << FIO_IO_U_PLAT_BITS)
-#define FIO_IO_U_PLAT_GROUP_NR 29
-#define FIO_IO_U_PLAT_NR (FIO_IO_U_PLAT_GROUP_NR * FIO_IO_U_PLAT_VAL)
-#define FIO_IO_U_LIST_MAX_LEN 20 /* The size of the default and user-specified
-                                       list of percentiles */
-
 /*
  * Trim cycle count measurements
  */
 /*
  * Trim cycle count measurements
  */