diff options
| author | Tao Cui <cuitao@kylinos.cn> | 2026-07-20 17:37:25 +0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-08-03 20:03:20 -0600 |
| commit | 4e050c5b92c1600415b2cd452583e543036f3d73 (patch) | |
| tree | e86871ac07444277aa9155409094fb76ce82e66b | |
| parent | e0698304bd4a833d6d5a7b6582515e36b1ec3ea7 (diff) | |
block/blk-iocost: collect per-cpu latency stats over possible CPUs
ioc_lat_stat() walks ioc->pcpu_stat with for_each_online_cpu() to
compute missed-ppm and rq_wait deltas. An offlined CPU is skipped, so
its delta is dropped from the period and its last_* watermark is not
advanced; on re-online the next collection sees a delta spanning the
whole offline interval, corrupting the latency/vrate picture.
Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost")
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Reviewed-by: Yu Kuai <yukuai@fygo.io>
Link: https://patch.msgid.link/20260720093726.28965-4-cui.tao@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>
| -rw-r--r-- | block/blk-iocost.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 8b2aeba2e1e3..b60625613e09 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -1592,7 +1592,7 @@ static void ioc_lat_stat(struct ioc *ioc, u32 *missed_ppm_ar, u32 *rq_wait_pct_p u64 rq_wait_ns = 0; int cpu, rw; - for_each_online_cpu(cpu) { + for_each_possible_cpu(cpu) { struct ioc_pcpu_stat *stat = per_cpu_ptr(ioc->pcpu_stat, cpu); u64 this_rq_wait_ns; |
