Repository navigation
blk-iocost: charge flushes and zone appends - #1266
blktests-ci-kpd[bot] wants to merge 4 commits into
Conversation
|
Upstream branch: 28924df |
4ddd216 to
00cc4ca
Compare
|
Upstream branch: 893e117 |
8338fac to
75680f9
Compare
00cc4ca to
7efd8cd
Compare
|
Upstream branch: 50d05c7 |
75680f9 to
1f6628a
Compare
7efd8cd to
a0aeca9
Compare
|
Upstream branch: 5225b8e |
1f6628a to
cefd9cc
Compare
a0aeca9 to
772381e
Compare
|
Upstream branch: 2f0c1cf |
cefd9cc to
5c91b68
Compare
772381e to
0224dee
Compare
|
Upstream branch: 2f0c1cf |
5c91b68 to
d842f75
Compare
0224dee to
f14340f
Compare
|
Upstream branch: 5878583 |
d842f75 to
80c2f17
Compare
|
Upstream branch: 5878583 |
80c2f17 to
ee8c750
Compare
f14340f to
0e174bc
Compare
8570656 to
0fdd559
Compare
eebb5bc to
bbd3af0
Compare
|
Upstream branch: ce1e022 |
0fdd559 to
99ba06a
Compare
bbd3af0 to
a9c0b46
Compare
|
Upstream branch: e767a4e |
99ba06a to
d574901
Compare
a9c0b46 to
72d0f5e
Compare
|
Upstream branch: a74306e |
d574901 to
ef0e09c
Compare
72d0f5e to
d980ad5
Compare
|
Upstream branch: None |
ef0e09c to
a506584
Compare
d980ad5 to
83b99cc
Compare
|
Upstream branch: 22430ae |
a506584 to
7c4d6ef
Compare
83b99cc to
9081535
Compare
|
Upstream branch: 69f80fe |
7c4d6ef to
ed5d608
Compare
The builtin linear cost model defines coefficients only for READ and WRITE, so the flush component of IOs is priced at zero: standalone flushes (the dataless REQ_OP_WRITE | REQ_PREFLUSH bios from blkdev_issue_flush()) and the pre-flush the block layer issues ahead of data-bearing REQ_PREFLUSH bios are both free. A cgroup limited to 1% weight could issue an unbounded number of flushes without being throttled: an fsync loop produced ~510k flushes in 12s with cost.usage staying at zero, monopolizing the device while iocost reported no activity. On ext4, a write+fsync workload showed the same gap: the write component was charged but the flush component was not. A flush is not like a write and the write coefficients say nothing about what it costs, so instead of pricing it off them, add a flushiops entry to io.cost.model, following the existing iops parameters: it sets the rate at which flushes are charged, LCOEF_FLUSH = VTIME_PER_SEC / flushiops. The linear model cannot express how the cost of a flush depends on the preceding writes, so this is a per-request policy charge: a user-tunable knob rather than a hardware property. A bio with REQ_PREFLUSH is charged one flush on top of its data cost, and a bio with REQ_FUA one more flush on devices without native FUA support. Zero (the default and the builtin profiles) means no charge, so nothing changes until the parameter is configured. Also skip the iocg->cursor update for dataless bios: they only reach it once priced, and their bi_sector is not a data position, so setting the cursor from it would misclassify the following IOs. Signed-off-by: Tao Cui <cuitao@kylinos.cn> Acked-by: Tejun Heo <tj@kernel.org>
Zone append is a primary write operation for zoned devices; zoned xfs and btrfs use it for data writes. It is priced at zero, so the zone append portion of zoned workloads runs outside the controller: a 1%-weight cgroup issued 16000 appends at zero cost on a zoned null_blk. Treat REQ_OP_ZONE_APPEND the same as REQ_OP_WRITE so it goes through the existing seq/rand classification and charging. Fixes: 0512a75 ("block: Introduce REQ_OP_ZONE_APPEND") Signed-off-by: Tao Cui <cuitao@kylinos.cn> Acked-by: Tejun Heo <tj@kernel.org>
ioc_rqos_done() only accounts READ and WRITE completions, so zone append completions are excluded from the latency window: the vrate feedback loop cannot see ZA-induced latency, leaving it unable to respond to device saturation caused by zone appends. Similarly, calc_size_vtime_cost_builtin() does not classify zone append as a write operation. Charging (the cost model) and feedback (the latency window) are separate mechanisms, so this is not covered by the previous patch that prices zone appends. Treat zone append as WRITE for both latency accounting and cost classification. Fixes: 0512a75 ("block: Introduce REQ_OP_ZONE_APPEND") Signed-off-by: Tao Cui <cuitao@kylinos.cn> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Tejun Heo <tj@kernel.org>
The comment says that priority-inversion IOs are "punted to @ioc->aux_iocg", but no aux_iocg field ever existed in struct ioc. The comment was introduced already stale by commit da437b9 ("blk-iocost: grab ioc->lock for debt handling"). Update it to describe the current use_debt / iocg->abs_vdebt mechanism. Signed-off-by: Tao Cui <cuitao@kylinos.cn> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Tejun Heo <tj@kernel.org>
|
Upstream branch: 7b63ef2 |
ed5d608 to
c42fcb8
Compare
|
Upstream branch: 7b63ef2 |
1 similar comment
|
Upstream branch: 7b63ef2 |
|
Github failed to update this PR after force push. Close it. |
Pull request for series with
subject: blk-iocost: charge flushes and zone appends
version: 1
url: https://patchwork.kernel.org/series/1160080/