summaryrefslogtreecommitdiffstats
path: root/block/bfq-iosched.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2021-01-11 17:47:16 +0100
committerJens Axboe <axboe@kernel.dk>2021-01-24 18:19:46 -0700
commit5ac83c644f5fb924f0b2c09102ab82fc788f8411 (patch)
tree44ecf60a95b280219d2872c1dec05a3f6f9a7e72 /block/bfq-iosched.c
parent2391d13ed484df1515f0025458e1f82317823fab (diff)
downloadlinux-5ac83c644f5fb924f0b2c09102ab82fc788f8411.tar.gz
linux-5ac83c644f5fb924f0b2c09102ab82fc788f8411.tar.bz2
linux-5ac83c644f5fb924f0b2c09102ab82fc788f8411.zip
Revert "blk-mq, elevator: Count requests per hctx to improve performance"
This reverts commit b445547ec1bbd3e7bf4b1c142550942f70527d95. Since both mq-deadline and BFQ completely ignore hctx they are passed to their dispatch function and dispatch whatever request they deem fit checking whether any request for a particular hctx is queued is just pointless since we'll very likely get a request from a different hctx anyway. In the following commit we'll deal with lock contention in these IO schedulers in presence of multiple HW queues in a different way. Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bfq-iosched.c')
-rw-r--r--block/bfq-iosched.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index c045613ce927..b12a416b51d7 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -4677,9 +4677,6 @@ static bool bfq_has_work(struct blk_mq_hw_ctx *hctx)
{
struct bfq_data *bfqd = hctx->queue->elevator->elevator_data;
- if (!atomic_read(&hctx->elevator_queued))
- return false;
-
/*
* Avoiding lock: a race on bfqd->busy_queues should cause at
* most a call to dispatch for nothing
@@ -5597,7 +5594,6 @@ static void bfq_insert_requests(struct blk_mq_hw_ctx *hctx,
rq = list_first_entry(list, struct request, queuelist);
list_del_init(&rq->queuelist);
bfq_insert_request(hctx, rq, at_head);
- atomic_inc(&hctx->elevator_queued);
}
}
@@ -5965,7 +5961,6 @@ static void bfq_finish_requeue_request(struct request *rq)
bfq_completed_request(bfqq, bfqd);
bfq_finish_requeue_request_body(bfqq);
- atomic_dec(&rq->mq_hctx->elevator_queued);
spin_unlock_irqrestore(&bfqd->lock, flags);
} else {