linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio_blk: merge S/G list entries by default
@ 2014-09-06 23:09 Christoph Hellwig
  2014-09-07 10:18 ` Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Christoph Hellwig @ 2014-09-06 23:09 UTC (permalink / raw)
  To: Rusty Russell, Michael S. Tsirkin
  Cc: Jens Axboe, linux-kernel, virtualization

Most virtio setups have a fairly limited number of ring entries available.
Enable S/G entry merging by default to fit into less of them.  This restores
the behavior at time of the virtio-blk blk-mq conversion, which was changed
by commit "block: add queue flag for disabling SG merging" which made the
behavior optional, but didn't update the existing drivers to keep their
previous behavior.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 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 0a58140..311b857 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -634,7 +634,7 @@ static int virtblk_probe(struct virtio_device *vdev)
 	vblk->tag_set.ops = &virtio_mq_ops;
 	vblk->tag_set.queue_depth = virtblk_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_SG_MERGE;
 	vblk->tag_set.cmd_size =
 		sizeof(struct virtblk_req) +
 		sizeof(struct scatterlist) * sg_elems;
-- 
1.9.1


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

end of thread, other threads:[~2014-09-10 16:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-06 23:09 [PATCH] virtio_blk: merge S/G list entries by default Christoph Hellwig
2014-09-07 10:18 ` Paolo Bonzini
2014-09-07 10:32 ` Ming Lei
2014-09-07 11:41 ` Michael S. Tsirkin
2014-09-07 18:47   ` Christoph Hellwig
2014-09-08  8:18     ` Michael S. Tsirkin
2014-09-08 20:15       ` Christoph Hellwig
2014-09-10 16:43         ` Michael S. Tsirkin
2014-09-08 16:21   ` Paolo Bonzini
     [not found] ` <CACVXFVMRqgEh7EFQ0cDEatsqtxsgBrbSQNH9b6UZTsSD+=OWdA__14121.5735966854$1410309057$gmane$org@mail.gmail.com>
2014-09-10 15:18   ` Paolo Bonzini
2014-09-10 15:21     ` Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).