From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] virtio-blk: allow more than one in-flight request Date: Thu, 27 Mar 2008 17:30:38 -0300 Message-ID: <20080327203038.GB10887@dmt> References: <20080327162948.GB8659@dmt> <200803271845.14059.borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: kvm-devel@lists.sourceforge.net, Marcelo Tosatti To: Christian Borntraeger Return-path: Content-Disposition: inline In-Reply-To: <200803271845.14059.borntraeger@de.ibm.com> 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 On Thu, Mar 27, 2008 at 06:45:14PM +0100, Christian Borntraeger wrote: > Am Donnerstag, 27. M=E4rz 2008 schrieb Marcelo Tosatti: > > = > > Allow more than one in-flight request in the virtio ring. This allows > > the host driver to submit requests in parallel. > [...] > > 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 > [...] > > @@ -202,7 +204,8 @@ static int virtblk_probe(struct virtio_device *vdev) > > goto out_free_vblk; > > } > > = > > - vblk->pool =3D mempool_create_kmalloc_pool(1,sizeof(struct virtblk_re= q)); > > + vblk->pool =3D mempool_create_kmalloc_pool(VIRTIO_BLK_POOL_SIZE, > > + sizeof(struct virtblk_req)); > > if (!vblk->pool) { > > err =3D -ENOMEM; > > goto out_free_vq; > [...] > = > Huh? I dont understand. You only change the number of pre-allocated pool = > entries. mempool_alloc should allow several allocations, even with 1 as = > initialization value. The pre-initialized value is only for oom situation= s. = > No? Thats right, the mempool allocation will fail under memory pressure (since __GFP_NOMEMALLOC is passed from mempool_allocate), but under normal circumstances it will allocate more than one entry. So ignore the patch. Sorry for the noise. ------------------------------------------------------------------------- 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