All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio-blk: make the queue depth configurable
@ 2014-03-14 17:31 Theodore Ts'o
  2014-03-14 17:38   ` Joe Perches
  0 siblings, 1 reply; 34+ messages in thread
From: Theodore Ts'o @ 2014-03-14 17:31 UTC (permalink / raw)
  To: Linux Kernel Developers List
  Cc: Theodore Ts'o, Rusty Russell, Michael S. Tsirkin, virtio-dev,
	virtualization, fes

The current virtio block sets a queue depth of 64.  With a
sufficiently fast device, using a queue depth of 256 can double the
IOPS which can be sustained.  So make the queue depth something which
can be set at module load time or via a kernel boot-time parameter.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: virtio-dev@lists.oasis-open.org
Cc: virtualization@lists.linux-foundation.org
Cc: fes@google.com
---
 drivers/block/virtio_blk.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 6a680d4..0c9e57f 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -481,6 +481,9 @@ static struct blk_mq_ops virtio_mq_ops = {
 	.free_hctx	= blk_mq_free_single_hw_queue,
 };
 
+static int queue_depth = 64;
+module_param(queue_depth, int, 444);
+
 static struct blk_mq_reg virtio_mq_reg = {
 	.ops		= &virtio_mq_ops,
 	.nr_hw_queues	= 1,
@@ -551,6 +554,7 @@ static int virtblk_probe(struct virtio_device *vdev)
 		goto out_free_vq;
 	}
 
+	virtio_mq_reg.queue_depth = queue_depth;
 	virtio_mq_reg.cmd_size =
 		sizeof(struct virtblk_req) +
 		sizeof(struct scatterlist) * sg_elems;
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 34+ messages in thread
* [PATCH] virtio-blk: make the queue depth configurable
@ 2014-03-14 17:31 Theodore Ts'o
  0 siblings, 0 replies; 34+ messages in thread
From: Theodore Ts'o @ 2014-03-14 17:31 UTC (permalink / raw)
  To: Linux Kernel Developers List
  Cc: fes, virtio-dev, Theodore Ts'o, Michael S. Tsirkin,
	virtualization

The current virtio block sets a queue depth of 64.  With a
sufficiently fast device, using a queue depth of 256 can double the
IOPS which can be sustained.  So make the queue depth something which
can be set at module load time or via a kernel boot-time parameter.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: virtio-dev@lists.oasis-open.org
Cc: virtualization@lists.linux-foundation.org
Cc: fes@google.com
---
 drivers/block/virtio_blk.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 6a680d4..0c9e57f 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -481,6 +481,9 @@ static struct blk_mq_ops virtio_mq_ops = {
 	.free_hctx	= blk_mq_free_single_hw_queue,
 };
 
+static int queue_depth = 64;
+module_param(queue_depth, int, 444);
+
 static struct blk_mq_reg virtio_mq_reg = {
 	.ops		= &virtio_mq_ops,
 	.nr_hw_queues	= 1,
@@ -551,6 +554,7 @@ static int virtblk_probe(struct virtio_device *vdev)
 		goto out_free_vq;
 	}
 
+	virtio_mq_reg.queue_depth = queue_depth;
 	virtio_mq_reg.cmd_size =
 		sizeof(struct virtblk_req) +
 		sizeof(struct scatterlist) * sg_elems;
-- 
1.9.0

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

end of thread, other threads:[~2015-04-28 14:02 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-14 17:31 [PATCH] virtio-blk: make the queue depth configurable Theodore Ts'o
2014-03-14 17:38 ` Joe Perches
2014-03-14 17:38   ` Joe Perches
2014-03-14 18:02   ` Theodore Ts'o
2014-03-14 18:02     ` Theodore Ts'o
2014-03-17  3:55     ` Rusty Russell
2014-03-17  3:55       ` Rusty Russell
2014-03-17  5:00       ` Joe Perches
2014-03-17  7:26         ` Joe Perches
2014-03-17  7:26         ` Joe Perches
2014-03-19  6:37           ` Rusty Russell
2014-03-19  6:37           ` Rusty Russell
2014-03-19  6:50             ` Joe Perches
2014-03-19  6:50             ` Joe Perches
2014-03-20  3:13               ` Stricter module param and sysfs permission checks Rusty Russell
2014-03-20  4:27                 ` Dave Jones
2014-03-20  9:15                   ` Alexey Dobriyan
2014-03-20 16:28                   ` Robert Jarzmik
2014-06-18 15:07                     ` Gobinda Charan Maji
2014-06-26  2:54                       ` Gobinda Charan Maji
2014-07-03  5:52                         ` Gobinda Charan Maji
2015-04-28 14:02                     ` Gobinda Charan Maji
2014-03-19 16:07             ` [PATCH] virtio-blk: make the queue depth configurable Greg Kroah-Hartman
2014-03-19 16:07               ` Greg Kroah-Hartman
2014-03-19 16:57             ` Bjorn Helgaas
2014-03-19 16:57             ` Bjorn Helgaas
2014-03-19 17:31               ` Joe Perches
2014-03-20  3:35                 ` Rusty Russell
2014-03-20  3:35                 ` Rusty Russell
2014-03-19 17:31               ` Joe Perches
2014-03-20  2:50               ` Rusty Russell
2014-03-20  2:50                 ` Rusty Russell
2014-03-17  5:00       ` Joe Perches
  -- strict thread matches above, loose matches on Subject: below --
2014-03-14 17:31 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.