From: Jagane Sundar <jagane@sundar.org>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "kwolf@redhat.com" <kwolf@redhat.com>,
"dlaor@redhat.com" <dlaor@redhat.com>,
"Jes.Sorensen@redhat.com" <Jes.Sorensen@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"avi@redhat.com" <avi@redhat.com>,
"jdenemar@redhat.com" <jdenemar@redhat.com>
Subject: Re: [Qemu-devel] [patch 6/7] QEMU live block copy
Date: Thu, 09 Jun 2011 08:42:17 -0700 [thread overview]
Message-ID: <4DF0E9D9.406@sundar.org> (raw)
In-Reply-To: <BANLkTi=2s11YY5o0LaBwhVZC7UNERYw4Qg@mail.gmail.com>
>> Hello Stefan,
>>
>> Can you expand on this some more? I have similar concerns for Livebackup.
>>
>> At the beginning of your paragraph, did you mean 'asynchronous I/O
>> emulation' instead of 'synchronous I/O emulation'?
>>
>> Also, I don't understand the 'stack' construct that you refer to. When you
>> say 'push a new context', are you talking about what happens when a new
>> thread picks up a new async I/O req from the VM, and then proceeds to
>> execute the I/O req? What is this stack that you refer to?
>>
>> Any design documents, code snippets that I can look, other pointers welcome.
> See async.c.
>
Thanks - I will do so.
> There is synchronous I/O emulation in block.c for BlockDrivers that
> don't support .bdrv_read()/.bdrv_write() but only
> .bdrv_aio_readv()/.bdrv_aio_writev(). The way it works is that it
> pushes a new I/O context and then issues async I/O. Then it runs a
> special event loop waiting for that I/O to complete. After the I/O
> completes it pops the context again.
>
OK. This is the opposite of what I was thinking of. I was considering
the code that emulates Async I/O using multiple threads.
It sounds like the goal of this async.c mechanism is more than
serializing all synchronous I/O requests, right?
> The point of the context is that completions only get called for the
> current context. Therefore callers of the synchronous I/O functions
> don't need to worry that the state of the world might change during
> their "synchronous" operation - only their own I/O operation can
> complete. If a pending async I/O completes during synchronous I/O
> emulation, its callback is not invoked until the bottom half (BH) is
> called after the async context is popped. This guarantees that the
> synchronous operation and its caller have completed before I/O
> completion callbacks are invoked for pending async I/O.
>
OK. This might not be a problem for Livebackup, after all.
Livebackup transparently interposes the async I/O offered by the driver.
Hence the async.c mechanism is layered neatly above the
async_block_driver+livebackup layer and should work correctly.
I will take a closer look at this, and check for sanity...
Thanks,
Jagane
next prev parent reply other threads:[~2011-06-09 15:42 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-06 16:55 [Qemu-devel] [patch 0/7] live block copy (v4) Marcelo Tosatti
2011-06-06 16:55 ` [Qemu-devel] [patch 1/7] add migration_active function Marcelo Tosatti
2011-06-06 16:55 ` [Qemu-devel] [patch 2/7] Add blkmirror block driver Marcelo Tosatti
2011-06-06 21:52 ` malc
2011-06-07 10:25 ` Stefan Hajnoczi
2011-06-06 16:55 ` [Qemu-devel] [patch 3/7] Add error messages for live block copy Marcelo Tosatti
2011-06-06 16:55 ` [Qemu-devel] [patch 4/7] Add blkdebug points " Marcelo Tosatti
2011-06-06 16:55 ` [Qemu-devel] [patch 5/7] Add vmstop code " Marcelo Tosatti
2011-06-06 16:55 ` [Qemu-devel] [patch 6/7] QEMU " Marcelo Tosatti
2011-06-06 17:03 ` [Qemu-devel] [patch 6/7] QEMU live block copy (update) Marcelo Tosatti
2011-06-07 10:15 ` Jiri Denemark
2011-06-15 15:49 ` Marcelo Tosatti
2011-06-15 15:51 ` Marcelo Tosatti
2011-06-07 12:15 ` [Qemu-devel] [patch 6/7] QEMU live block copy Stefan Hajnoczi
2011-06-08 15:10 ` Jagane Sundar
2011-06-08 16:18 ` Stefan Hajnoczi
2011-06-09 15:42 ` Jagane Sundar [this message]
2011-06-15 16:59 ` Marcelo Tosatti
2011-06-06 16:55 ` [Qemu-devel] [patch 7/7] do not allow migration if block copy in progress Marcelo Tosatti
-- strict thread matches above, loose matches on Subject: below --
2011-05-23 21:31 [Qemu-devel] [patch 0/7] live block copy (v3) Marcelo Tosatti
2011-05-23 21:31 ` [Qemu-devel] [patch 6/7] QEMU live block copy Marcelo Tosatti
2011-05-24 19:15 ` Blue Swirl
2011-06-03 15:59 ` Marcelo Tosatti
2011-05-29 8:54 ` Avi Kivity
2011-05-31 16:06 ` Marcelo Tosatti
2011-05-31 16:14 ` Avi Kivity
2011-05-31 16:38 ` Marcelo Tosatti
2011-05-31 16:53 ` Avi Kivity
2011-06-03 16:20 ` Marcelo Tosatti
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=4DF0E9D9.406@sundar.org \
--to=jagane@sundar.org \
--cc=Jes.Sorensen@redhat.com \
--cc=avi@redhat.com \
--cc=dlaor@redhat.com \
--cc=jdenemar@redhat.com \
--cc=kwolf@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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.