Paolo Bonzini <pbonz...@redhat.com> wrote:
> Accessing s->state outside the big QEMU lock will simplify a bit the
> locking/unlocking of the iothread lock.
>
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>

Reviewed-by: Juan Quintela <quint...@redhat.com>

We compensate the locking removal you did on the previous patch.

> +    __sync_val_compare_and_swap(&s->state, MIG_STATE_ACTIVE, 
> MIG_STATE_ERROR);

This can be done later, but can we change this to a macro/inline
function:

inline void migration_set_state(int state)
{
    __sync_val_compare_and_swap(&s->state, MIG_STATE_ACTIVE, state);
}

or something like that?

Reply via email to