dm-stats latency histograms currently report the service time observed
by device-mapper (start of the target I/O until completion). Under load
that differs from the latency userspace sees, because requests may sit
queued in the block layer for some time before dispatch.
Also the histogram currently tracks all kinds of I/O at one place.

The first three patches fix request-based dm timing and teach histograms
to optionally account the full block-layer lifetime of a bio (from the
issue stamp maintained by blk-cgroup) via a new hist_total_latency
region option. Only the histogram is switched to total latency; the
classic counters keep reporting service time.

The remaining patches generalize a region to hold several independent
histograms, classify each I/O into read/write/flush classes, and expose
rd_histogram, wr_histogram and flush_histogram feature arguments that
may be combined with the existing histogram argument. Data-less flushes,
previously dropped by accounting because they carry zero sectors, become
visible to flush histograms (accounted in the first area of the region
without touching the classic counters). FUA writes are classified as
both writes and flushes.

https://virtuozzo.atlassian.net/browse/VSTOR-103846

Andrey Zhadchenko (11):
  drivers/md/dm-rq: fix time accounting for request-based dm drivers
  block/bio: add bio_issue_elapsed_ns()
  drivers/md/dm-stats: add new hist_total_latency option
  drivers/md/dm-stats: propagate operation flags instead of direction
  drivers/md/dm-stats: prepare for multiple histograms per region
  drivers/md/dm-stats: introduce I/O classes for histogram dispatch
  drivers/md/dm-stats: add rd_histogram option
  drivers/md/dm-stats: add wr_histogram option
  drivers/md/dm-stats: prepare for accounting data-less flushes
  drivers/md/dm-stats: add flush_histogram option
  drivers/md/dm-stats: account FUA writes in flush histograms

 .../admin-guide/device-mapper/statistics.rst  |  37 ++-
 block/bio.c                                   |  23 ++
 drivers/md/dm-rq.c                            |  11 +-
 drivers/md/dm-stats.c                         | 310 ++++++++++++++----
 drivers/md/dm-stats.h                         |   5 +-
 drivers/md/dm.c                               |   6 +-
 include/linux/bio.h                           |   2 +
 7 files changed, 321 insertions(+), 73 deletions(-)

-- 
2.43.5

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to