qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 13/41] migration: prepare to access s->state out


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 13/41] migration: prepare to access s->state outside critical sections
Date: Thu, 21 Feb 2013 18:42:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Paolo Bonzini <address@hidden> 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 <address@hidden>

Reviewed-by: Juan Quintela <address@hidden>

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

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