qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v11 14/15] rdma: introduce MIG_STATE_NONE and ch


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v11 14/15] rdma: introduce MIG_STATE_NONE and change MIG_STATE_SETUP state transition
Date: Tue, 25 Jun 2013 12:13:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

Il 25/06/2013 11:49, Juan Quintela ha scritto:
> address@hidden wrote:
>> From: "Michael R. Hines" <address@hidden>
>>
>> As described in the previous patch, until now, the MIG_STATE_SETUP
>> state was not really a 'formal' state. It has been used as a 'zero' state
>> (what we're calling 'NONE' here) and QEMU has been unconditionally 
>> transitioning
>> into this state when the QMP migration command was called. Instead we want to
>> introduce MIG_STATE_NONE, which is our starting state in the state machine, 
>> and
>> then immediately transition into the MIG_STATE_SETUP state when the QMP 
>> migrate
>> command is issued.
>>
>> In order to do this, we must delay the transition into MIG_STATE_ACTIVE until
>> later in the migration_thread(). This is done to be able to timestamp the 
>> amount of
>> time spent in the SETUP state for proper accounting to the user during
>> an RDMA migration.
>>
>> Furthermore, the management software, until now, has never been aware of the
>> existence of the SETUP state whatsoever. This must change, because, timing 
>> of this
>> state implies that the state actually exists.
>>
>> These two patches cannot be separated because the 'query_migrate' QMP
>> switch statement needs to know how to handle this new state transition.
>>
>> Tested-by: Michael R. Hines <address@hidden>
>> Signed-off-by: Michael R. Hines <address@hidden>
> 
>> @@ -316,6 +321,7 @@ static void migrate_fd_cancel(MigrationState *s)
>>  {
>>      DPRINTF("cancelling migration\n");
>>  
>> +    migrate_set_state(s, MIG_STATE_SETUP, MIG_STATE_CANCELLED);
>>      migrate_set_state(s, MIG_STATE_ACTIVE, MIG_STATE_CANCELLED);
>>  }
> 
> This chunk is wrong.
> 
> we can call qme_migrate_cancel() at any point,  and it is going to be
> called normally from MIG_STATE_ACTIVE.
> 
>     migrate_set_satet(s, s->state,  MIG_STATE_CANCELLED)
> 
> should do the trick.  Or something like that,  what do you think?

I don't like the three-arguments migrate_set_state, but I don't have any
better idea.

With Juan's modification, it is fine (but not reviewed-by me :)).  While
you resend, the first 13 patches of v10 can be merged (pull request).
You can then rebase the last three on top.

Michael, did you look at the "debugging/getting the protocol ready" mode
where all pages are unpinned?

Paolo



reply via email to

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