[Devel] [PATCH VZ10 v2 00/11] dm-stats: total latency and per-class histograms
Andrey Zhadchenko
andrey.zhadchenko at virtuozzo.com
Mon Jul 27 19:32:43 MSK 2026
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.
v2: a few small fixes regarding empty lines, hunk placement, functuon
rename and initialization
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 | 321 ++++++++++++++----
drivers/md/dm-stats.h | 5 +-
drivers/md/dm.c | 6 +-
include/linux/bio.h | 2 +
7 files changed, 326 insertions(+), 79 deletions(-)
--
2.43.5
More information about the Devel
mailing list