diff options
| author | Tao Cui <cuitao@kylinos.cn> | 2026-08-04 13:41:20 +0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-08-04 07:23:04 -0600 |
| commit | 4d73bf0ca4fbe7f252154ce98d6693c6c198164c (patch) | |
| tree | 49038ba784f0f1c4379854e79c5dcc1bf9d5852b /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 3bf9a21e7bccfd8c35b440efd114c61cc9838a41 (diff) | |
block/blk-iocost: annotate ioc_pd_stat reads with data_race()
ioc_pd_stat() reads ioc->enabled, ioc->vtime_base_rate, and
iocg->last_stat without holding ioc->lock, which trips KCSAN since
ioc_adjust_base_vrate() and iocg_flush_stat_upward() write those
fields under ioc->lock.
Commit 35198e323001 fixed the same issue in ioc_qos_prfill() and
ioc_cost_model_prfill() by adding spin_lock_irq(&ioc->lock). However,
those functions read configuration parameters (qos/model) that need
synchronized reads. In contrast, ioc_pd_stat() only reads stat
values (vrate, usage) where stale reads are harmless, so data_race()
is more appropriate — it silences the KCSAN warning without adding
lock contention during high-frequency stat reads.
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://patch.msgid.link/20260804054120.161933-1-cui.tao@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
