From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: [PATCH] virtio-blk: allow more than one in-flight request Date: Thu, 27 Mar 2008 13:29:48 -0300 Message-ID: <20080327162948.GB8659@dmt> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Rusty Russell , Anthony Liguori Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Allow more than one in-flight request in the virtio ring. This allows the host driver to submit requests in parallel. Signed-off-by: Marcelo Tosatti diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 3b1a68d..5bb041f 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -30,6 +30,8 @@ struct virtio_blk struct scatterlist sg[VIRTIO_MAX_SG]; }; +#define VIRTIO_BLK_POOL_SIZE 32 + struct virtblk_req { struct list_head list; @@ -202,7 +204,8 @@ static int virtblk_probe(struct virtio_device *vdev) goto out_free_vblk; } - vblk->pool = mempool_create_kmalloc_pool(1,sizeof(struct virtblk_req)); + vblk->pool = mempool_create_kmalloc_pool(VIRTIO_BLK_POOL_SIZE, + sizeof(struct virtblk_req)); if (!vblk->pool) { err = -ENOMEM; goto out_free_vq; ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace