All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] qcow2 performance plan
Date: Tue, 14 Sep 2010 18:30:49 +0200	[thread overview]
Message-ID: <4C8FA339.7080000@redhat.com> (raw)
In-Reply-To: <4C8F93E4.80008@codemonkey.ws>

  On 09/14/2010 05:25 PM, Anthony Liguori wrote:
>
> The incremental version of this is hard for me to understand.  
> bdrv_read() may be implemented in terms of bdrv_aio_read() + 
> qemu_io_wait() which dispatches bottom halves.  This is done through a 
> shared resource so if you allow bdrv_read() to be called in parallel, 
> there's a very real possibility that you'll get corruption of a shared 
> resource.
>
> You'd have to first instrument bdrv_read() to be re-entrant by 
> acquiring bs.mutex() in every bdrv_read() caller.  You would then need 
> to modify the file protocol so that it could safely be called in 
> parallel.
>
> IOW, you've got to make the whole block layer thread safe before you 
> can begin to make qcow2 thread safe.
>

It does rely on CONFIG_IO_THREAD and qemu_mutex.  However, we don't need 
to make the whole block layer safe, just the syncronous parts (drop 
qemu_mutex after I/O is issued, rely on the image's mutex for internal 
synchronization).

-- 
error compiling committee.c: too many arguments to function

      reply	other threads:[~2010-09-14 16:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14 13:07 [Qemu-devel] qcow2 performance plan Avi Kivity
2010-09-14 13:43 ` Anthony Liguori
2010-09-14 15:11   ` Kevin Wolf
2010-09-14 15:20     ` Anthony Liguori
2010-09-14 15:47       ` Kevin Wolf
2010-09-14 16:03         ` Stefan Hajnoczi
2010-09-14 16:16           ` Anthony Liguori
2010-09-14 16:28             ` Avi Kivity
2010-09-14 17:08               ` Anthony Liguori
2010-09-14 17:23                 ` Avi Kivity
2010-09-14 18:58                   ` Anthony Liguori
2010-09-14 14:01 ` [Qemu-devel] " Kevin Wolf
2010-09-14 15:14   ` Stefan Hajnoczi
2010-09-14 15:25 ` [Qemu-devel] " Anthony Liguori
2010-09-14 16:30   ` Avi Kivity [this message]

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=4C8FA339.7080000@redhat.com \
    --to=avi@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=kwolf@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.