Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iocost: better trace vrate changes

vrate_adj tracepoint traces vrate changes; however, it does so only
when busy_level is non-zero. busy_level turning to zero can sometimes
be as interesting an event. This patch also enables vrate_adj
tracepoint on other vrate related events - busy_level changes and
non-zero nr_lagging.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Tejun Heo and committed by
Jens Axboe
25d41e4a b89f625e

+6 -1
+6 -1
block/blk-iocost.c
··· 1343 1343 u32 ppm_wthr = MILLION - ioc->params.qos[QOS_WPPM]; 1344 1344 u32 missed_ppm[2], rq_wait_pct; 1345 1345 u64 period_vtime; 1346 - int i; 1346 + int prev_busy_level, i; 1347 1347 1348 1348 /* how were the latencies during the period? */ 1349 1349 ioc_lat_stat(ioc, missed_ppm, &rq_wait_pct); ··· 1531 1531 * and experiencing shortages but not surpluses, we're too stingy 1532 1532 * and should increase vtime rate. 1533 1533 */ 1534 + prev_busy_level = ioc->busy_level; 1534 1535 if (rq_wait_pct > RQ_WAIT_BUSY_PCT || 1535 1536 missed_ppm[READ] > ppm_rthr || 1536 1537 missed_ppm[WRITE] > ppm_wthr) { ··· 1593 1592 atomic64_set(&ioc->vtime_rate, vrate); 1594 1593 ioc->inuse_margin_vtime = DIV64_U64_ROUND_UP( 1595 1594 ioc->period_us * vrate * INUSE_MARGIN_PCT, 100); 1595 + } else if (ioc->busy_level != prev_busy_level || nr_lagging) { 1596 + trace_iocost_ioc_vrate_adj(ioc, atomic64_read(&ioc->vtime_rate), 1597 + &missed_ppm, rq_wait_pct, nr_lagging, 1598 + nr_shortages, nr_surpluses); 1596 1599 } 1597 1600 1598 1601 ioc_refresh_params(ioc, false);