summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTao Cui <cuitao@kylinos.cn>2026-09-22 12:38:54 +0800
committerJens Axboe <axboe@kernel.dk>2026-10-16 08:21:06 -0600
commitfebdbf5682fa7e8f325b07a2c115e7632c4252bd (patch)
treec285126cf4d29a5a561278f973919525d6c10059
parentf8bc5c74d9eccc87d2e27767f92b8c11b3315d72 (diff)
downloadlinux-next-febdbf5682fa7e8f325b07a2c115e7632c4252bd.tar.gz
linux-next-febdbf5682fa7e8f325b07a2c115e7632c4252bd.zip
blk-iocost: charge zone appends as writes
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: 0512a75b98f8 ("block: Introduce REQ_OP_ZONE_APPEND") Signed-off-by: Tao Cui <cuitao@kylinos.cn> Acked-by: Tejun Heo <tj@kernel.org> Link: https://patch.msgid.link/20260922043856.2020116-3-cui.tao@linux.dev Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--block/blk-iocost.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 546458246cf9..6b262ccb6b32 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -2557,6 +2557,7 @@ static void calc_vtime_cost_builtin(struct bio *bio, struct ioc_gq *iocg,
coef_randio = ioc->params.lcoefs[LCOEF_RRANDIO];
coef_page = ioc->params.lcoefs[LCOEF_RPAGE];
break;
+ case REQ_OP_ZONE_APPEND:
case REQ_OP_WRITE:
coef_seqio = ioc->params.lcoefs[LCOEF_WSEQIO];
coef_randio = ioc->params.lcoefs[LCOEF_WRANDIO];