public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo@kvack.org>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: kvm-devel@lists.sourceforge.net, Marcelo Tosatti <marcelo@kvack.org>
Subject: Re: [PATCH] virtio-blk: allow more than one in-flight request
Date: Thu, 27 Mar 2008 17:30:38 -0300	[thread overview]
Message-ID: <20080327203038.GB10887@dmt> (raw)
In-Reply-To: <200803271845.14059.borntraeger@de.ibm.com>

On Thu, Mar 27, 2008 at 06:45:14PM +0100, Christian Borntraeger wrote:
> Am Donnerstag, 27. März 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 = 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;
> [...]
> 
> 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 situations. 
> 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

  reply	other threads:[~2008-03-27 20:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27 16:29 [PATCH] virtio-blk: allow more than one in-flight request Marcelo Tosatti
2008-03-27 17:45 ` Christian Borntraeger
2008-03-27 20:30   ` Marcelo Tosatti [this message]
2008-03-27 23:22 ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080327203038.GB10887@dmt \
    --to=marcelo@kvack.org \
    --cc=borntraeger@de.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox