qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 46/47] postcopy: Wire up loadvm_postcopy_ram_


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v4 46/47] postcopy: Wire up loadvm_postcopy_ram_handle_{run, end} commands
Date: Sat, 04 Oct 2014 19:51:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto:
> +        bool one_message = false;
> +        /* This looks good, but it's possible that the device loading in the
> +         * main thread hasn't finished yet, and so we might not be in 'RUN'
> +         * state yet.
> +         * TODO: Using an atomic_xchg or something for this

This looks like a good match for QemuEvent.  Or just mutex & condvar.

> +         */
> +        while (mis->postcopy_ram_state == POSTCOPY_RAM_INCOMING_LISTENING) {

What if we had postcopy of something else than RAM?  Can you remove the
"ram" part from the symbols that do not directly deal with RAM but just
with the protocol?

Paolo

> +            if (!one_message) {
> +                DPRINTF("%s: Waiting for RUN", __func__);
> +                one_message = true;
> +            }
> +        }
> +    }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]