提交 b03db9cd 编写于 作者: M Ming Lei 提交者: Zheng Zengkai

blk-mq: set default elevator as deadline in case of hctx shared tagset

mainline inclusion
from mainline-v5.13-rc1
commit 580dca81
category: performance
bugzilla: 187991,https://gitee.com/openeuler/kernel/issues/I66VDN
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=580dca8143d215977811bd2ff881e1e4f6ff39f0

----------------------------------------

Yanhui found that write performance is degraded a lot after applying
hctx shared tagset on one test machine with megaraid_sas. And turns out
it is caused by none scheduler which becomes default elevator caused by
hctx shared tagset patchset.

Given more scsi HBAs will apply hctx shared tagset, and the similar
performance exists for them too.

So keep previous behavior by still using default mq-deadline for queues
which apply hctx shared tagset, just like before.

Fixes: 32bc15af ("blk-mq: Facilitate a shared sbitmap per tagset")
Reported-by: NYanhui Ma <yama@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: NMing Lei <ming.lei@redhat.com>
Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: NBart Van Assche <bvanassche@acm.org>
Reviewed-by: NJohn Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/20210406031933.767228-1-ming.lei@redhat.comSigned-off-by: NJens Axboe <axboe@kernel.dk>

Conflict:
	block/elevator.c
Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
Reviewed-by: NHou Tao <houtao1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 45761028
...@@ -630,7 +630,8 @@ static struct elevator_type *elevator_get_default(struct request_queue *q) ...@@ -630,7 +630,8 @@ static struct elevator_type *elevator_get_default(struct request_queue *q)
if (q->tag_set && q->tag_set->flags & BLK_MQ_F_NO_SCHED_BY_DEFAULT) if (q->tag_set && q->tag_set->flags & BLK_MQ_F_NO_SCHED_BY_DEFAULT)
return NULL; return NULL;
if (q->nr_hw_queues != 1) if (q->nr_hw_queues != 1 &&
!blk_mq_is_sbitmap_shared(q->tag_set->flags))
return NULL; return NULL;
return elevator_get(q, "mq-deadline", false); return elevator_get(q, "mq-deadline", false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册