public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio_blk: set the default scheduler to none
@ 2023-12-07  4:31 Li Feng
  2023-12-07  6:02 ` Jason Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 24+ messages in thread
From: Li Feng @ 2023-12-07  4:31 UTC (permalink / raw)
  To: Jens Axboe, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Xuan Zhuo, open list:BLOCK LAYER, open list,
	open list:VIRTIO BLOCK AND SCSI DRIVERS
  Cc: Li Feng

virtio-blk is generally used in cloud computing scenarios, where the
performance of virtual disks is very important. The mq-deadline scheduler
has a big performance drop compared to none with single queue. In my tests,
mq-deadline 4k readread iops were 270k compared to 450k for none. So here
the default scheduler of virtio-blk is set to "none".

Signed-off-by: Li Feng <fengli@smartx.com>
---
 drivers/block/virtio_blk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index d53d6aa8ee69..5183ec8e00be 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -1367,7 +1367,7 @@ static int virtblk_probe(struct virtio_device *vdev)
 	vblk->tag_set.ops = &virtio_mq_ops;
 	vblk->tag_set.queue_depth = queue_depth;
 	vblk->tag_set.numa_node = NUMA_NO_NODE;
-	vblk->tag_set.flags = BLK_MQ_F_SHOULD_MERGE;
+	vblk->tag_set.flags = BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_NO_SCHED_BY_DEFAULT;
 	vblk->tag_set.cmd_size =
 		sizeof(struct virtblk_req) +
 		sizeof(struct scatterlist) * VIRTIO_BLK_INLINE_SG_CNT;
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-12-28  7:23 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-07  4:31 [PATCH] virtio_blk: set the default scheduler to none Li Feng
2023-12-07  6:02 ` Jason Wang
2023-12-07  6:32   ` Li Feng
2023-12-07  6:38   ` Michael S. Tsirkin
2023-12-07  6:53 ` Chaitanya Kulkarni
2023-12-07  7:21   ` Li Feng
2023-12-07  9:48     ` Chaitanya Kulkarni
2023-12-07 14:51 ` Stefan Hajnoczi
2023-12-07 14:55   ` Paolo Bonzini
2023-12-07 15:19     ` Christoph Hellwig
2023-12-08  2:00 ` Ming Lei
2023-12-08  2:44   ` Keith Busch
2023-12-08  3:15     ` Jens Axboe
2023-12-08  3:54     ` Ming Lei
2023-12-08  5:55       ` Li Feng
2023-12-08 11:07         ` Paolo Bonzini
2023-12-25 14:20 ` Michael S. Tsirkin
2023-12-26  9:01   ` Li Feng
2023-12-26  9:05     ` Michael S. Tsirkin
2023-12-26 12:14       ` Li Feng
2023-12-26 15:38     ` Michael S. Tsirkin
2023-12-27  7:26       ` Li Feng
2023-12-27 10:06         ` Michael S. Tsirkin
2023-12-28  7:25           ` Li Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox