qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	ming.lei@canonical.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 2/2] block: bump coroutine pool size for drives
Date: Mon, 7 Jul 2014 10:12:07 +0200	[thread overview]
Message-ID: <20140707081207.GA21110@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <8738eh30gg.fsf@blackfin.pond.sub.org>

[-- Attachment #1: Type: text/plain, Size: 937 bytes --]

On Fri, Jul 04, 2014 at 12:03:27PM +0200, Markus Armbruster wrote:
> Stefan Hajnoczi <stefanha@redhat.com> writes:
> > @@ -2112,6 +2115,7 @@ void bdrv_detach_dev(BlockDriverState *bs, void *dev)
> >      bs->dev_ops = NULL;
> >      bs->dev_opaque = NULL;
> >      bs->guest_block_size = 512;
> > +    qemu_coroutine_adjust_pool_size(-64);
> >  }
> >  
> >  /* TODO change to return DeviceState * when all users are qdevified */
> 
> This enlarges the pool regardless of how the device model uses the block
> layer.  Isn't this a bit crude?
> 
> Have you considered adapting the number of coroutines to actual demand?
> Within reasonable limits, of course.

I picked the simplest algorithm because I couldn't think of one which is
clearly better.  We cannot predict future coroutine usage so any
algorithm will have pathological cases.

In this case we might as well stick to the simplest implementation.

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-07-07  8:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04  8:56 [Qemu-devel] [PATCH v2 0/2] coroutine: dynamically scale pool size Stefan Hajnoczi
2014-07-04  8:56 ` [Qemu-devel] [PATCH v2 1/2] coroutine: make pool size dynamic Stefan Hajnoczi
2014-07-04  8:56 ` [Qemu-devel] [PATCH v2 2/2] block: bump coroutine pool size for drives Stefan Hajnoczi
2014-07-04 10:03   ` Markus Armbruster
2014-07-07  8:12     ` Stefan Hajnoczi [this message]
2014-07-07 12:32       ` Markus Armbruster
2014-07-04 10:36   ` Lluís Vilanova
2014-07-07  8:12     ` Stefan Hajnoczi

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=20140707081207.GA21110@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=ming.lei@canonical.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).