Commit Graph

5 Commits

Author SHA1 Message Date
Piotr Pelplinski
a3f7d8aa4d histograms: add function to merge histograms
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I75f737a7e0a5490eeb183e6fa922fa8e17d30268

Reviewed-on: https://review.gerrithub.io/432558
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-11-15 23:03:26 +00:00
Jim Harris
bc00666271 util: enable dynamic spdk_histogram_data sizing
Currently, each histogram range is hardcoded to
128 buckets (1ULL << 7), resulting in 58 ranges
(64 - 7 + 1) and a total size of 58 * 128 *
sizeof(uint64_t) = 59392 bytes.

To allow for more usage models in cases where this
size is prohibitive, enable the following changes:

1) specify number of buckets per range (in number of bits)
2) specify max datapoint value (in number of bits)

The latter can be useful for cases where datapoints
are never close to requiring all 64 bits - and allows
reducing the number of ranges.  Any data points that
exceed the max will be tallied in the last bucket
in the last range.

Testing shows no performance disadvantage using the
dynamic approach.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5979bcdff6209faaa9dee293918ef2a78679bcd4

Reviewed-on: https://review.gerrithub.io/392707
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-29 14:20:48 -05:00
Jim Harris
2eeec4be49 util: add abstractions for accessing histogram buckets
This simplifies some upcoming changes, where the
buckets will be a dynamically allocated array instead
of a static 2-dimensional array.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3854319385937be9f9ace4be7dd22423e24f25e3

Reviewed-on: https://review.gerrithub.io/392706
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-29 14:20:48 -05:00
Jim Harris
87b8c7db3c util: add histogram as param to internal functions
No functional change - this just reduces the diff for
some upcoming changes.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic185d32b38d5ccbc81cab49a6a38ebde0da71afd

Reviewed-on: https://review.gerrithub.io/392705
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-29 14:20:48 -05:00
Jim Harris
5044e4f65a histogram: move nvme/perf histogram code to a common header
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia0083365b2da63cb38aebb9f7bbc02f4dfd1ae94

Reviewed-on: https://review.gerrithub.io/365263
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-14 14:20:03 -04:00