All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio-blk: Initialize blkqueue depth from virtqueue size
@ 2014-03-14 23:57 Venkatesh Srinivas
  2014-03-15  3:34   ` Theodore Ts'o
  0 siblings, 1 reply; 27+ messages in thread
From: Venkatesh Srinivas @ 2014-03-14 23:57 UTC (permalink / raw)
  To: tytso, rusty, mst, virtualization, fes

virtio-blk set the default queue depth to 64 requests, which was
insufficient for high-IOPS devices. Instead set the blk-queue depth to
the device's virtqueue depth divided by two (each I/O requires at least
two VQ entries).

Signed-off-by: Venkatesh Srinivas <venkateshs@google.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 b1cb3f4..863ab02 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -485,7 +485,6 @@ static struct blk_mq_ops virtio_mq_ops = {
 static struct blk_mq_reg virtio_mq_reg = {
 	.ops		= &virtio_mq_ops,
 	.nr_hw_queues	= 1,
-	.queue_depth	= 64,
 	.numa_node	= NUMA_NO_NODE,
 	.flags		= BLK_MQ_F_SHOULD_MERGE,
 };
@@ -555,6 +554,7 @@ static int virtblk_probe(struct virtio_device *vdev)
 	virtio_mq_reg.cmd_size =
 		sizeof(struct virtblk_req) +
 		sizeof(struct scatterlist) * sg_elems;
+	virtio_mq_reg.queue_depth = vblk->vq->num_free / 2;
 
 	q = vblk->disk->queue = blk_mq_init_queue(&virtio_mq_reg, vblk);
 	if (!q) {
-- 
1.9.0.279.gdc9e3eb

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

end of thread, other threads:[~2014-04-04  4:50 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-14 23:57 [PATCH] virtio-blk: Initialize blkqueue depth from virtqueue size Venkatesh Srinivas
2014-03-15  3:34 ` [PATCH] virtio-blk: make the queue depth the max supportable by the hypervisor Theodore Ts'o
2014-03-15  3:34   ` Theodore Ts'o
2014-03-15 10:57   ` Konrad Rzeszutek Wilk
2014-03-15 10:57     ` Konrad Rzeszutek Wilk
2014-03-15 13:20     ` Theodore Ts'o
2014-03-15 13:20       ` Theodore Ts'o
2014-03-15 13:57   ` Christoph Hellwig
2014-03-15 13:57     ` Christoph Hellwig
2014-03-15 15:13     ` Theodore Ts'o
2014-03-15 15:13       ` Theodore Ts'o
2014-03-17  0:42   ` Rusty Russell
2014-03-17  0:42     ` Rusty Russell
2014-03-17  5:40     ` tytso
2014-03-17  5:40       ` tytso
2014-03-19  6:28       ` Rusty Russell
2014-03-19  6:28         ` Rusty Russell
2014-03-19 17:48         ` Venkatesh Srinivas
2014-03-19 17:48           ` Venkatesh Srinivas
2014-03-25 18:50           ` Venkatesh Srinivas
2014-03-25 18:50             ` Venkatesh Srinivas
2014-03-31  3:52             ` Rusty Russell
2014-03-31  3:52               ` Rusty Russell
2014-04-01  2:27               ` Theodore Ts'o
2014-04-01 10:49                 ` Stefan Hajnoczi
2014-04-02  7:36                   ` Rusty Russell
2014-04-01  2:27               ` Theodore Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.