Uri Lublin wrote:
Anthony Liguori wrote:
Uri Lublin wrote:
Migration to file, uses migration-to-fd (supports live migration).
Migration from file, uses qemu-fopen directly.
Eh? Haven't we already talked about why this doesn't work? Maybe
there's a v3 that you meant to send?
Actually I do have a v3 which uses posix-aio-compat.c
It's a much more complicated solution then just writing to a file
though.
Also I am not sure if I need to use a signal or not as the migration
(to-fd) code is polling. And if I use signal should I use SIGUSR2 or
a different one and use a pipe similar to block-raw-posix.c ?
How is the migration code polling? It will attempt to do writes
until a write returns EAGAIN. At this point, it will wait for
notification that the more writes are available. Remember, migration
is a streaming protocol, not a random access, so it only makes sense
to have one outstanding request at a time.
Your code would look something like:
write() -> submit aio request
until aio completes, write returns EAGAIN
when aio completes, notify migration code that we are writable again