summaryrefslogtreecommitdiff
path: root/block/kyber-iosched.c
diff options
context:
space:
mode:
authorYu Kuai <yukuai@fnnas.com>2026-02-03 16:19:43 +0800
committerJens Axboe <axboe@kernel.dk>2026-02-03 07:45:36 -0700
commit1db61b0afdd7e8aa9289c423fdff002603b520b5 (patch)
tree35f8e7299f29d041b0ffef960d62c3755307c366 /block/kyber-iosched.c
parent9fc7900b14727d39457bd3724f26e6e3faca3efd (diff)
blk-mq-sched: unify elevators checking for async requests
bfq and mq-deadline consider sync writes as async requests and only reserve tags for sync reads by async_depth, however, kyber doesn't consider sync writes as async requests for now. Consider the case there are lots of dirty pages, and user use fsync to flush dirty pages. In this case sched_tags can be exhausted by sync writes and sync reads can stuck waiting for tag. Hence let kyber follow what mq-deadline and bfq did, and unify async requests checking for all elevators. Signed-off-by: Yu Kuai <yukuai@fnnas.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/kyber-iosched.c')
-rw-r--r--block/kyber-iosched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c
index c1b36ffd19ce..2b3f5b8959af 100644
--- a/block/kyber-iosched.c
+++ b/block/kyber-iosched.c
@@ -556,7 +556,7 @@ static void kyber_limit_depth(blk_opf_t opf, struct blk_mq_alloc_data *data)
* We use the scheduler tags as per-hardware queue queueing tokens.
* Async requests can be limited at this stage.
*/
- if (!op_is_sync(opf)) {
+ if (!blk_mq_is_sync_read(opf)) {
struct kyber_queue_data *kqd = data->q->elevator->elevator_data;
data->shallow_depth = kqd->async_depth;